From: NaderH on
Hello and thanks in advance,

I have an issue that I am trying to work around. I have an aspx page that
needs to load up a formated XLS spreadsheet into a DIV tag and then allow the
user to input data that will be retrieved later on postback and values store
in a MS SQL database.

I created an excel spreadsheet and formatted it with the formulas and
colors. I also added a combobox from the control toolbox. I also added a
checkbox from the control toolbox to another cell. I then saved the page
using File-->Save AS WebPage. I checked the 'Add Interactively' checkbox on
the save dialog. I then opened the file in an editor and copied the object
tag into my aspx page. Everything was fine except my combobox and checkbox
did not appear in the HTML spreadsheet.

I am assuming that I have to EITHER programmatically add the controls prior
to render or add the combobox as a XML element to the proper node of the
XMLData value parameter attribute.

the current XML Block for this node is :

<Row ss:AutoFitHeight="0" ss:Height="18.75">
<Cell ss:StyleID="s23"><Data ss:Type="String">Fund</Data></Cell>
<Cell ss:StyleID="s23"/>
<Cell ss:StyleID="s23"><Data ss:Type="String">Eng</Data></Cell>
<Cell ss:StyleID="s24" ss:Formula="=SUM(RC[1]:RC[11])"><Data
ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
<Cell ss:StyleID="s25"/>
</Row>

The second cell, between FUND and ENG is where I need to add the combobox.

Does anyone have a clean way of doing this? also how about binding data to
this control. This data is coming from SQL DB, and not from a range in the
activesheet.

Thanks in advance
NaderH

From: joel on

In Excel controls sit on top of the worksheet and not in the cells. the
controls are treated as shapes. I think using Access instead of Excel
is the corect solution. In Acces the controls are really part of the
database structure and the controls go into the database rather than a
shape sitting onto of the database.

Try making a simple database putting the controls into the database
then save the database as HTML and see if you get the desire results.

You can can open an Access Database is a similar fashion in .Net as you
would amn Excel Database.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=172358

[url=&quot;http://www.thecodecage.com&quot;]Microsoft Office Help[/url]