Solved

Saving excel file as a csv file

Posted on 2014-10-21
1
238 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
First Blank Cell in a range 7 35
DBF to ... Converter 5 43
FormulaArray VBA Issue 6 17
Most Consistent Performer 4 21
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now