How do you specify a sheet when using redirection from a webpage

  • Thread starter Thread starter WISEMANOFNARNIA
  • Start date Start date
W

WISEMANOFNARNIA

I have code in asp.net that is supposed to create a spreadsheet. It
works for some people, but others complain that the spreadsheet has no
'sheet1', and instead they are told it has an 'illegal sheet name'.
So I experimented: I thought the XML for the spreadsheet could start
with a tag like <sheet name='MyFirstSheet'>. But putting that tag in
doesn't make a difference. In fact, I don't even know if the tag
exists in some kind of Excel xml language.
Does anyone have an idea of how I would specify a name for a sheet?
(technical note - I am using asp.net's Response.Write and passing it
xml)
Thanks,
Marvin
 
workbooks has an optional parameter for a templet. If you don't have a
templet, then a default workbook wil be create. I suspect you are passing a
parameter with some data an casuing the errors. try putting NULL in the
parameter field and see if the errors go away.


workbooks.add(templet)
 
Create the barebones sheet in Excel then save as XML.

Look at that and then produce the same from ASP.

I get this:
'*****************
<Worksheet ss:Name="MySheet">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1"
x:FullColumns="1"
x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">Hello</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<Selected/>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
'******************

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top