#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mcorley
 
Posts: n/a
Default CSV file

My excel worksheet options are set to display 0.41200 (5 decimal places).
How can I keep this formatting when I save as a csv file? (I keep losing the
zeros).
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default CSV file

mcorley wrote...
My excel worksheet options are set to display 0.41200 (5 decimal places).
How can I keep this formatting when I save as a csv file? (I keep losing the
zeros).


You'd need to convert all these numbers to text. You could create a new
worksheet and enter formulas in that worksheet like

A1:
=IF(ISNUMBER(OriginalWS!A1),TEXT(OriginalWS!A1,"0. 00000"),OriginalWS!A1&"")

Fill that worksheet with these formulas, then save it instead of your
original worksheet as the CSV file. The only other alternative is
writing a macro to write the CSV file using VBA file I/O statements.
The mirrored worksheet changing numbers to text is easier.

That said, you'd need to reformat these numbers when you open the CSV
file. There's NO WAY to save formatting information in CSV files.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mcorley
 
Posts: n/a
Default CSV file

Thank you, I will give it a try.

"Harlan Grove" wrote:

mcorley wrote...
My excel worksheet options are set to display 0.41200 (5 decimal places).
How can I keep this formatting when I save as a csv file? (I keep losing the
zeros).


You'd need to convert all these numbers to text. You could create a new
worksheet and enter formulas in that worksheet like

A1:
=IF(ISNUMBER(OriginalWS!A1),TEXT(OriginalWS!A1,"0. 00000"),OriginalWS!A1&"")

Fill that worksheet with these formulas, then save it instead of your
original worksheet as the CSV file. The only other alternative is
writing a macro to write the CSV file using VBA file I/O statements.
The mirrored worksheet changing numbers to text is easier.

That said, you'd need to reformat these numbers when you open the CSV
file. There's NO WAY to save formatting information in CSV files.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Beege
 
Posts: n/a
Default CSV file

mcorley,

I believe it does save the 5 decimal places in th CSV file, but when youy
open it again with excel, excel drops it off again.

Try saving as CSV, open with Notepad and see what you get...


Beege

"mcorley" wrote in message
...
My excel worksheet options are set to display 0.41200 (5 decimal places).
How can I keep this formatting when I save as a csv file? (I keep losing
the
zeros).



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mcorley
 
Posts: n/a
Default CSV file

Thank you, it is there when I open it in Notepad.

"Beege" wrote:

mcorley,

I believe it does save the 5 decimal places in th CSV file, but when youy
open it again with excel, excel drops it off again.

Try saving as CSV, open with Notepad and see what you get...


Beege

"mcorley" wrote in message
...
My excel worksheet options are set to display 0.41200 (5 decimal places).
How can I keep this formatting when I save as a csv file? (I keep losing
the
zeros).




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
Copy File Automatically on Opening It Dolores Excel Discussion (Misc queries) 4 December 30th 05 07:12 PM
Pasword protected Excel file encrypted, how do I read this file? jonesteam Excel Discussion (Misc queries) 2 December 12th 05 06:32 PM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
How do you open a template at startup? James Kendall Excel Discussion (Misc queries) 7 July 26th 05 07:33 PM
Opening a file with code without a set file name jenkinspat Excel Discussion (Misc queries) 1 March 3rd 05 03:40 PM


All times are GMT +1. The time now is 09:19 PM.

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"