Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Scenario:
Converting an Excel File to a CSV File. Saving on a disk and than downloading it to a DOS program. Problem: When I convert the excel file to the CSV File and save, it does not save the same number format. Example: In Excel, the number format is 6.90 or 33.00. After converting to a CSV file for upload to a DOS program, the 6.90 changes to 6.9 and the 33.00 changes to 33 - the ending zeros disappear. Question: How can I maintain the numbers with the ending zeros after the decimal point? Any Solutions? Thank-You |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Laura
Try formatting the data to text before saving -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk blog (non-tech): www.nickhodge.co.uk/blog/ "laura1027" <u34668@uwe wrote in message news:7303faee8b1d9@uwe... Scenario: Converting an Excel File to a CSV File. Saving on a disk and than downloading it to a DOS program. Problem: When I convert the excel file to the CSV File and save, it does not save the same number format. Example: In Excel, the number format is 6.90 or 33.00. After converting to a CSV file for upload to a DOS program, the 6.90 changes to 6.9 and the 33.00 changes to 33 - the ending zeros disappear. Question: How can I maintain the numbers with the ending zeros after the decimal point? Any Solutions? Thank-You |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Are you sure?
If you re-open that CSV file in excel, then formatting will be gone. But what do you see if you open the CSV file in NotePad? It's not the saving as CSV that's the problem, it's the reopening within excel that's the problem. laura1027 wrote: Scenario: Converting an Excel File to a CSV File. Saving on a disk and than downloading it to a DOS program. Problem: When I convert the excel file to the CSV File and save, it does not save the same number format. Example: In Excel, the number format is 6.90 or 33.00. After converting to a CSV file for upload to a DOS program, the 6.90 changes to 6.9 and the 33.00 changes to 33 - the ending zeros disappear. Question: How can I maintain the numbers with the ending zeros after the decimal point? Any Solutions? Thank-You -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Nick, text formatting the colums do not work. The ending zeros still
disappear when converting the excel file to CSV format. Dave, saving the file to notepad works in so far as the ending zeros do not disappear and remain when converting to notepad. However, I have to find out if the notepad format is the correct format for downloading into the DOS program. I do not do this part, my current employer, who created the order entry DOS program that he uses for his business, does the downloading. I will see if it works tomorrow. Thank-You both for your help. Laura -- Message posted via http://www.officekb.com |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Laura,
I would check again your answer to Nick, if I were you. I'm pretty sure that you'll find it's the same situation that Dave described. If you look at the CSV file with Notepad, or any other text editor, I expect you'll see the data in the format you had originally. The only problem is if you use Excel to read the CSV. If you rename the .csv file to .txt, then you can allow Excel to treat each column as text, and not reformat it. Hopefully your DOS program won't reformat the data when it reads it from the CSV. Your reply to Dave suggests that you've used Notepad to save the file again. You don't need to do that, as the file content is already OK. If you've seen any effect, it is probably that you've saved as .txt rather than .csv, and thus affected how Excel treats the data when it reads it back in, but the content of the file should be the same. -- David Biddulph "laura1027 via OfficeKB.com" <u34668@uwe wrote in message news:73434a09ef0e7@uwe... Nick, text formatting the colums do not work. The ending zeros still disappear when converting the excel file to CSV format. Dave, saving the file to notepad works in so far as the ending zeros do not disappear and remain when converting to notepad. However, I have to find out if the notepad format is the correct format for downloading into the DOS program. I do not do this part, my current employer, who created the order entry DOS program that he uses for his business, does the downloading. I will see if it works tomorrow. Thank-You both for your help. Laura |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi David B.
Maybe I do not understand it that well. I will look at it tomorrow again. Thanks Laura -- Message posted via http://www.officekb.com |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Laura,
I can't see your original post (it just ain't there -- just your reply to Nick's reply), and you haven't quoted the replies, but I'll add this. Saving as CSV writes a text file exactly as it appears (as formatted) on the sheet. If you open that saved text file with Notepad, you'll see exactly what's in the file, character for character. There is no formatting information in a text file -- just characters, and Notepad shows you what they are. Thats's all. If you reopen the text file in Excel, formatting gets applied that isn't always desired (leading zeroes dropped, stuff that looks like a date but ain't a date gets converted to a date, etc.). In short, it's probably getting saved as is, but if reopened in Excel, it's getting changed. If saving it as a CSV truly isn't doing what you need, try the Text Write Program (and Excel Workbook with a macro) at www.smokeylake.com/excel. -- Earl Kiosterud www.smokeylake.com Note: Some folks prefer bottom-posting. But if you bottom-post to a reply that's already top-posted, the thread gets messy. When in Rome... ----------------------------------------------------------------------- "laura1027 via OfficeKB.com" <u34668@uwe wrote in message news:73434a09ef0e7@uwe... Nick, text formatting the colums do not work. The ending zeros still disappear when converting the excel file to CSV format. Dave, saving the file to notepad works in so far as the ending zeros do not disappear and remain when converting to notepad. However, I have to find out if the notepad format is the correct format for downloading into the DOS program. I do not do this part, my current employer, who created the order entry DOS program that he uses for his business, does the downloading. I will see if it works tomorrow. Thank-You both for your help. Laura -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CSV File and Maintaining Quotation Marks in TXT | Excel Discussion (Misc queries) | |||
Maintaining Row Number | Excel Discussion (Misc queries) | |||
Odd number conversions??? | Excel Discussion (Misc queries) | |||
Maintaining Number Colors | Excel Discussion (Misc queries) | |||
Maintaining formats of files | Excel Discussion (Misc queries) |