Solved

Saving excel file as a csv file

Posted on 2014-10-21
1
248 Views
Last Modified: 2014-10-21
Hello

I have to save an excel file as a csv file.  One of the columns has data which may begin with zero(s).  After the saving the file I notice the leading zero(s) are dropped.  When I save the file as a text this does not happen, but I need a csv file.

Thank you,
John
0
Comment
Question by:jverasql
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
Josh Carpenter earned 500 total points
ID: 40395070
What's happening is that Excel is formatting the numbers as numbers (integers) and then removes the zeros from view. You can format those cells differently so that the zeroes are properly displayed: http://office.microsoft.com/en-us/excel-help/format-numbers-as-text-HP010342535.aspx

From their Tips on that page:

"When you enter a number that begins with a zero—for example, a product code—Excel will delete the zero by default. If this is not what you want, you can create a custom number format that forces Excel to retain the leading zero. For example, if you're typing or pasting ten-digit product codes in a worksheet, Excel will change numbers like 0784367998 to 784367998. In this case, you could create a custom number format consisting of the code 0000000000, which forces Excel to display all ten digits of the product code, including the leading zero. For more information about this issue, see Create or delete a custom number format and Keep leading zeros in number codes."
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question