View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Exporting To Excel With ASP - Number Problem

Aprevious post of mine.....

"What version of Excel, and how are you doing the export?

If as HTML, there are some attributes you can add to the html to indicate to
Excel how it should format the output.

Saving an Excel sheet with text-formatted cells gives me this "CSS" style
(amongst others):

mso-number-format:"\@";

You can investigate the various possible values by saving an XL sheet with
cells of various formats and looking at the generated HTML.

Also a small example he
http://msdn.microsoft.com/library/de...us/dnwebteam/h
tml/webteam10012002.asp

I think this is OK (or at least a subset of it) for XL 97+"

Tim.



"williamsd " wrote in message
...
Hello,

I'm trying to export a report from an .asp page using the
Response.ContentType method. The only problem with the export is that
when numbers are exported, if there is a 0 or more than one 0 in the
front of the number, it gets removed by excel when the export is
complete. Also, if the number is too long it gets auto-formated to
Scientific. I need to know if there is a formula that I can use on my
export to force the Number Cells to be Text only Cells so that I don't
loose the 0's in front of the number and also to prevent it from
auto-formating to Scientific if the number is too long. Anyone know
how I could do this?


---
Message posted from http://www.ExcelForum.com/