ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Interactive web page (https://www.excelbanter.com/excel-programming/336240-interactive-web-page.html)

Kris Bethea

Interactive web page
 
Hello!
I've been searching the web for nearly a week now trying to figure out how
to read the information a user can enter into an interactive web excel
spreadsheet.

More precisely, I need for a user to enter an unlimited amount of numbers
and I need to be able to read the numbers and enter them into a database (SQL
Server). To protect from user errors, my team thought it might be a good idea
to provide the Excel Spreadsheet in a web page and users can just paste the
information directly into it, and then click a button to upload the
information to our database.

I have found that Javascript can read the variables entered into the Excel
Spreadsheet, but I cannot find how to code directly into the VB.NET (2003)
environment. I would prefer NOT to use Javascript if possible.

If someone could point me in the right direction so that I can find
information that is already available on the web, or if someone could share
an example of how to do this, it would be greatly appreciated.

Thanks!
Kris

vbMental

Interactive web page
 
Hi, we might be able to assist each other. I can help you with the .NET part
but how do you have it embedded into the page. Can you paste the html and
javascript code?

"Kris Bethea" wrote:

Hello!
I've been searching the web for nearly a week now trying to figure out how
to read the information a user can enter into an interactive web excel
spreadsheet.

More precisely, I need for a user to enter an unlimited amount of numbers
and I need to be able to read the numbers and enter them into a database (SQL
Server). To protect from user errors, my team thought it might be a good idea
to provide the Excel Spreadsheet in a web page and users can just paste the
information directly into it, and then click a button to upload the
information to our database.

I have found that Javascript can read the variables entered into the Excel
Spreadsheet, but I cannot find how to code directly into the VB.NET (2003)
environment. I would prefer NOT to use Javascript if possible.

If someone could point me in the right direction so that I can find
information that is already available on the web, or if someone could share
an example of how to do this, it would be greatly appreciated.

Thanks!
Kris


Kris Bethea

Interactive web page
 
The spreadsheet is embedded as an object:

<OBJECT id="excel2" classid="clsid:0002E559-0000-0000-C000-000000000046"
VIEWASTEXT
<PARAM NAME="DataType" VALUE="XMLDATA"
<PARAM NAME="XMLData" VALUE='<?xml version="1.0"?
<ss:Workbook xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet"
<x:ExcelWorkbook
<x:ProtectStructureFalse</x:ProtectStructure
<x:ActiveSheet0</x:ActiveSheet
</x:ExcelWorkbook
<ss:Styles
<ss:Style ss:ID="Default"
<ss:Alignment ss:Horizontal="Automatic" ss:Rotate="0.0"
ss:Vertical="Bottom"
ss:ReadingOrder="Context"/
<ss:Borders
</ss:Borders
<ss:Font ss:FontName="Arial" ss:Size="10" ss:Color="Automatic" ss:Bold="0"
ss:Italic="0" ss:Underline="None"/
<ss:Interior ss:Color="Automatic" ss:Pattern="None"/
<ss:NumberFormat ss:Format="General"/
<ss:Protection ss:Protected="1"/
</ss:Style
</ss:Styles
<c:ComponentOptions
<c:Label
<c:CaptionMicrosoft Office Spreadsheet</c:Caption
</c:Label
<c:MaxHeight80%</c:MaxHeight
<c:MaxWidth80%</c:MaxWidth
<c:NextSheetNumber4</c:NextSheetNumber
</c:ComponentOptions
<x:WorkbookOptions
<c:OWCVersion11.0.0.6255 </c:OWCVersion
<x:Height7620</x:Height
<x:Width15240</x:Width
</x:WorkbookOptions
<ss:Worksheet ss:Name="Sheet1"
<x:WorksheetOptions
<x:Selected/
<x:ViewableRangeR1:R262144</x:ViewableRange
<x:SelectionR1C1</x:Selection
<x:TopRowVisible0</x:TopRowVisible
<x:LeftColumnVisible0</x:LeftColumnVisible
<x:ProtectContentsFalse</x:ProtectContents
</x:WorksheetOptions
<c:WorksheetOptions
</c:WorksheetOptions
</ss:Worksheet
<ss:Worksheet ss:Name="Sheet2"
<x:WorksheetOptions
<x:ViewableRangeR1:R262144</x:ViewableRange
<x:SelectionR1C1</x:Selection
<x:TopRowVisible0</x:TopRowVisible
<x:LeftColumnVisible0</x:LeftColumnVisible
<x:ProtectContentsFalse</x:ProtectContents
</x:WorksheetOptions
<c:WorksheetOptions
</c:WorksheetOptions
</ss:Worksheet
<ss:Worksheet ss:Name="Sheet3"
<x:WorksheetOptions
<x:ViewableRangeR1:R262144</x:ViewableRange
<x:SelectionR1C1</x:Selection
<x:TopRowVisible0</x:TopRowVisible
<x:LeftColumnVisible0</x:LeftColumnVisible
<x:ProtectContentsFalse</x:ProtectContents
</x:WorksheetOptions
<c:WorksheetOptions
</c:WorksheetOptions
</ss:Worksheet
</ss:Workbook
'
<PARAM NAME="AllowPropertyToolbox" VALUE="-1"
<PARAM NAME="AutoFit" VALUE="0"
<PARAM NAME="Calculation" VALUE="-4105"
<PARAM NAME="Caption" VALUE="Microsoft Office Spreadsheet"
<PARAM NAME="DisplayColumnHeadings" VALUE="-1"
<PARAM NAME="DisplayGridlines" VALUE="-1"
<PARAM NAME="DisplayHorizontalScrollBar" VALUE="-1"
<PARAM NAME="DisplayOfficeLogo" VALUE="-1"
<PARAM NAME="DisplayPropertyToolbox" VALUE="0"
<PARAM NAME="DisplayRowHeadings" VALUE="-1"
<PARAM NAME="DisplayTitleBar" VALUE="0"
<PARAM NAME="DisplayToolbar" VALUE="-1"
<PARAM NAME="DisplayVerticalScrollBar" VALUE="-1"
<PARAM NAME="DisplayWorkbookTabs" VALUE="-1"
<PARAM NAME="EnableEvents" VALUE="-1"
<PARAM NAME="MaxHeight" VALUE="80%"
<PARAM NAME="MaxWidth" VALUE="80%"
<PARAM NAME="MoveAfterReturn" VALUE="-1"
<PARAM NAME="MoveAfterReturnDirection" VALUE="-4121"
<PARAM NAME="RightToLeft" VALUE="0"
<PARAM NAME="ScreenUpdating" VALUE="-1"
<PARAM NAME="LockedDown" VALUE="0"
<PARAM NAME="ConnectedToChart" VALUE="0"
<PARAM NAME="DefaultQueryOnLoad" VALUE="-1"
<PARAM NAME="EnableUndo" VALUE="-1"
</OBJECT

I just created a test script to pull the first value. And a button that
calls the function.
<script

function get_a1() {
alert ('the value of cell A1 is: ' + excel2.range('a1').value);
return false;
}

</script

THANKS! :)
Kris

"vbMental" wrote:

Hi, we might be able to assist each other. I can help you with the .NET part
but how do you have it embedded into the page. Can you paste the html and
javascript code?

"Kris Bethea" wrote:

Hello!
I've been searching the web for nearly a week now trying to figure out how
to read the information a user can enter into an interactive web excel
spreadsheet.

More precisely, I need for a user to enter an unlimited amount of numbers
and I need to be able to read the numbers and enter them into a database (SQL
Server). To protect from user errors, my team thought it might be a good idea
to provide the Excel Spreadsheet in a web page and users can just paste the
information directly into it, and then click a button to upload the
information to our database.

I have found that Javascript can read the variables entered into the Excel
Spreadsheet, but I cannot find how to code directly into the VB.NET (2003)
environment. I would prefer NOT to use Javascript if possible.

If someone could point me in the right direction so that I can find
information that is already available on the web, or if someone could share
an example of how to do this, it would be greatly appreciated.

Thanks!
Kris



All times are GMT +1. The time now is 04:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com