By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,161 Members | 2,002 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,161 IT Pros & Developers. It's quick & easy.

OWC11 Spreadsheet layout help needed

P: n/a
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?

--
Gerry Roston
ge***@pairofdocs.net
734-516-6715
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Trying to post in the Anthropology forum sent me here after log-in.
Don't know why.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #2

P: n/a
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
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.