OWC11 Spreadsheet layout help needed

G

Gerry Roston

I have a rather simple ASP.NET program for displaying a formatted
spreadsheet. (Needless to say, there will be some data added!):

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim xlsheet As New SpreadsheetClass

Dim rs As New StreamReader(Server.MapPath(".") + "mySheet.xml")
Dim xmlContentFromFile As String = rs.ReadToEnd()
xlsheet.XMLData = xmlContentFromFile

Dim xlFileName As String = System.DateTime.Now.Ticks.ToString() +
".xls"
xlsheet.Export(Server.MapPath(".") + "\\" + xlFileName,
OWC11.SheetExportActionEnum.ssExportActionNone,
OWC11.SheetExportFormat.ssExportHTML)
Response.ContentType = "application/x-msexcel"
Response.WriteFile(Server.MapPath(".") + "\\" + xlFileName)
End Sub

mySheet.xml is an Excel 2003 spreadsheet that was save in XML format.
Looking in the .XML file, one finds:

<PageSetup>
<Layout x:Orientation="Landscape"/>
<Header x:Margin="0.25" x:Data="Stuff"/>
<Footer x:Margin="0.25" x:Data="More Stuff"/>
<PageMargins x:Bottom="0.5" x:Right="0.25" x:Top="0.75"/>
</PageSetup>

When the aspx page is loaded, the page displays in portrait mode (or so it
appears). More importantly, if I "Save As" the spreadsheet as a .XLS file
and open it, all page layout information is lost. This include the margins,
header/footer text, orientation, etc.

What must I do to preserve this information?
 
J

Jenab2

Somebody should examine the software for this forum. Every time I try
to post to a threat in Science-Anthropology section, a defective link
kicks me over here.

Jerry Abbott
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top