473,385 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

OWC11 Spreadsheet layout help needed

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
2 3269
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stefan Hirtbach | last post by:
Hi, I wrote a small program in C#, using OWC11, that fills data in an excelsheet and save it to disk as xls-file (using the Export-function). It works well with Office 2003 but i've got problems...
0
by: AMD | last post by:
Hello everybody :) Is it possible to use OWC11 (spreadsheet) in a webform which is developped with VS 2005 (VB.NET - ASP.NET) ? I know that it is possible with VS 2003 but I can't do the same with...
0
by: FrankB | last post by:
Hello, I would like to use the OWC11 Spreadsheet in my C# program. Filling values into cells is no problem, but formatting is not possible. How can I change the width of columns, the color of...
1
by: RBChallenger | last post by:
Can anyone tell me how to set the font properties in an embedded OWC11 excel speradsheet. You can get to the font properties via spreadSheet.Cells.Font.<Property>, however if I want to set the...
0
by: Hugo Flores | last post by:
I developed a Web project using Visual Studio 2005 Web Deployment Projects. I'm also using OWC11 for some charts. The problem I have is that when I transfer the deployment folders to the server I...
0
by: Ujval Shah | last post by:
Hi, I am facing a peculiar problem. My Client Requirement is to Export and Import Excel from and To DataSet for web Application using OWC. Now Problem is When i Export file using OWC .. File's...
0
by: joedirt851 | last post by:
I am trying to build a chart into a spreadsheet using OWC11. I have lots of examples of building charts to send to ASP pages, and lots for creating spreadsheets, but nothing about putting a chart...
1
by: oliviers | last post by:
Hi, From an aspx (.net 2.0) web site, I basically want to provide my users with some data in an excel format. I found that a good way was to user the owc11 library (from Office 2003). It...
2
by: jit007 | last post by:
HI all , I am creating a UI using VBA program where I am using OWC 11 control. What I want is that--- when user will select the pricular cell(say, D4) in the OWC spreadsheet, a combo box appears...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.