472,980 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Formatting asp generated spreadsheet

I'm successfully using Response.ContentType = "application/vnd.ms-excel"
to generate an Excel spreadsheet from an asp page and a SQL Server
database.

One of the columns contains data that is a long number (13 characters
eg. 1122334444566). The spreadsheet does not display the number
correctly because the column is formatted as 'General' so it displays
1.12233E+12.
To correct this in Excel I simply change the column type to number. How
do I get around this in asp.

I know I could use fso to create the spreadsheet on the server using a
template, but I prefer to do it on the client side so that I don't
accumulate a whole lot of xls files on the server.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
1 1374
That's the limitation of spoofing a spreadsheet -- letting Excel believe the
incoming stream is actually an XLS file, when it is actually an HTML table.
One way around this would be to stream a rich-XML, with schema, but then
only Excel 2002 and later will be able to read this.

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"+ DiamondEagle" <an**********@webmail.co.za> wrote in message
news:u7**************@TK2MSFTNGP11.phx.gbl...
I'm successfully using Response.ContentType = "application/vnd.ms-excel"
to generate an Excel spreadsheet from an asp page and a SQL Server
database.

One of the columns contains data that is a long number (13 characters
eg. 1122334444566). The spreadsheet does not display the number
correctly because the column is formatted as 'General' so it displays
1.12233E+12.
To correct this in Excel I simply change the column type to number. How
do I get around this in asp.

I know I could use fso to create the spreadsheet on the server using a
template, but I prefer to do it on the client side so that I don't
accumulate a whole lot of xls files on the server.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: scooterm | last post by:
### Question Can anyone name a text editor or XML editor (prefer open source) that can open a simple table XML file in a spreadsheet-type GUI, without adding any extra formatting or junk to the...
1
by: Josh Schmidt | last post by:
I'm using the Excel application object to create a spreadsheet from a recordset. Everything seems to work fine except any date fields are not displaying properly. For example 4/18/2004 is...
2
by: Colleyville Alan | last post by:
I am using Access and have embedded the ActiveX control Formula One that came with Office 2000. (ver 3.04). I have created and formatted a spreadsheet and now I want to copy the info with...
0
by: ImraneA | last post by:
Hi there Have a database, where front-end interface allows user to select a ms access database. From there, standard tables are linked. Routine, that creates a spreadsheet, for each table a...
0
by: Giganews | last post by:
I have a TransferSpreadsheet process in my Access 97 database that sends data out to an Excel spreadsheet formatted with a Times New Roman 10 point font, centered text, etc... This always works...
0
by: sradoff | last post by:
I wish to use XPath to access data from within an Excel generated XML Spreadsheet (generated with MS Excel 2003). I am using an asp Web page (not .NET, not at this time). I instantiate...
6
by: DeniseY | last post by:
I have an Access report that is created on the fly by the user selecting the fields to be included. The Access report comes out fine, but I want it to automatically output to an Excel spreadsheet....
3
by: jmarcrum | last post by:
I want to export a report (that contains two separate queries, 1. Current year data, and 2. split-year data) from access into excel, but everytime I run my code and export the data to excel, it looks...
2
by: mattloflin | last post by:
First off I have searched on this forum and others for about 1.5 hours and can't find relevant information. I have a form that is in viewsheet or datasheet mode so when you click it it looks like...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.