Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy File Automatically on Opening It | Excel Discussion (Misc queries) | |||
Pasword protected Excel file encrypted, how do I read this file? | Excel Discussion (Misc queries) | |||
Links picking up values from an older version of linked file | Links and Linking in Excel | |||
How do you open a template at startup? | Excel Discussion (Misc queries) | |||
Opening a file with code without a set file name | Excel Discussion (Misc queries) |