?
Solved

Losing zeros opening a CSV file

Posted on 2012-09-07
4
Medium Priority
?
370 Views
Last Modified: 2012-09-07
Hi, i have a text file where the leading zero is being dropped when i open using excel.

Is there anyway to preserve the zero?

Thanks
Seamus
0
Comment
Question by:Seamus2626
  • 2
  • 2
4 Comments
 
LVL 20

Expert Comment

by:n2fc
ID: 38376155
You can preserve it by forcing it to be treated as alpha rather than numeric...

Do this by editing the text file with a quote (") prior to the field...

I presume this is probably a zip-code? Not that it matters!
0
 

Author Comment

by:Seamus2626
ID: 38376168
No, its just data in a notepad. But when it opens as a CSV it loses the leading zeros.

How can i introduce the (") to the field, where is this enetered?

Thanks
0
 
LVL 20

Accepted Solution

by:
n2fc earned 2000 total points
ID: 38376175
See the following article on how to preserve leading zeros...

http://www.howtogeek.com/howto/microsoft-office/how-to-import-a-csv-file-containing-a-column-with-a-leading-0-into-excel/

You can ignore my prior answer as it doesn't work!
0
 

Author Closing Comment

by:Seamus2626
ID: 38376240
Thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
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…

850 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