Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exporting To Excel With ASP - Number Problem

Hello,

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

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Exporting To Excel With ASP - Number Problem

You might try prefixing each data cell with an appostropy. I think this
should cause Excel to treat the values as strings instead of numbers thus
preserving your leading zeros.


"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/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exporting To Excel With ASP - Number Problem

Yea I know about that, but it's for a report, and I do not want th
apostrophes to be displayed, are there any other possible solutions

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 177
Default Exporting To Excel With ASP - Number Problem

They won't be displayed.

Give it a try. Just launch Excel and type '000001 into a cell. After you
move the focus from the cell all you'll see is 000001. Excel suppresses the
display of the initial '.





"williamsd " wrote in message
...
Yea I know about that, but it's for a report, and I do not want the
apostrophes to be displayed, are there any other possible solutions?


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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exporting To Excel With ASP - Number Problem

Sorry, but it does display on my export. I opened Excel on it's own an
tried it like you suggested, worked perfectly. But as soon as I trie
it on my export, the apostrophe still shows. I even did cantation o
the value and the apostrophe before I displayed it and it still doe
not work

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Exporting To Excel With ASP - Number Problem

Once it's open, I can remove the apostrophe and then type it back in b
hand and then it dissappears! But it won't dissappear unless I d
that. This is making me want to rip the hair from my head

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

  #7   Report Post  
Posted to microsoft.public.excel.programming
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/



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Exporting To Excel With ASP - Number Problem

check out http://www.greggriffiths.org/webdev/both/excel/ which offers some
other methods of doing this.

Josh Sale wrote:

You might try prefixing each data cell with an appostropy. I think this
should cause Excel to treat the values as strings instead of numbers thus
preserving your leading zeros.

"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/


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Exporting To Excel With ASP - Number Problem

check out http://www.greggriffiths.org/webdev/both/excel/ which offers some
other methods of doing this.

Josh Sale wrote:

You might try prefixing each data cell with an appostropy. I think this
should cause Excel to treat the values as strings instead of numbers thus
preserving your leading zeros.

"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/


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem creating formulas when exporting QuickBooks files to Excel edpoz New Users to Excel 1 December 8th 09 11:19 PM
Exporting Data from MAS500 into Excel problem Ken Excel Discussion (Misc queries) 4 July 12th 07 02:18 PM
problem exporting data from Office PivotTable Components to Excel Hammami Excel Discussion (Misc queries) 0 December 22nd 06 11:16 AM
Problem exporting to excel with Windows XP bhigdon Excel Discussion (Misc queries) 1 August 13th 05 12:06 PM
Exporting to Excel using ASP Problem jtk7622 Excel Programming 0 November 17th 03 06:20 PM


All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"