473,387 Members | 1,603 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,387 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 1389
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.