Solved

want leading  0's in a csv file not xls

Posted on 2013-10-27
5
267 Views
Last Modified: 2013-10-27
want all the fields in a column to be 9 digits

some numbers are
67
want

00000000000067

tried column change in microsoft excel 2007

but will not save because I need to convert to .csv
0
Comment
Question by:rgb192
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 500 total points
ID: 39604336
[EDIT]: You have now changed the question! [/EDIT]

Hi,

Select the entire column, & use [CTRL]+[1] key combination to display the "Format Cells" dialog box.

Click the [Number] tab if not already shown, & select the "Custom" Category.

For 9 digits, enter a Type of:
000000000

Confirm with the [OK] button.

PS. I note that your question asks for "9 digits" but you then state:
00000000000067

(14 digits)

If you do want 14 digits, enter a Type of:
00000000000000

BFN,

fp.

[EDIT]: You have now changed the question! [/EDIT]
0
 

Author Comment

by:rgb192
ID: 39604337
but this feature will not be preserved if I save as .csv
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39604339
Yes, but when I started to type my answer there was no mention of "csv" (file) in your question text.
0
 

Author Closing Comment

by:rgb192
ID: 39604344
correct answer before I edited

thank you
0
 
LVL 35

Expert Comment

by:[ fanpages ]
ID: 39604348
In order to maintain leading zero(e)s within Comma Separated Value [CSV] format files, the respective columns (fields) will be required to be enclosed within quotes.

For example...
---
"00000000000067", "second column row 1"
"00000000000123", "second column row 2"
"00000000004567", "second column row 3"
---

If you wish to create CSV files with numeric fields in this manner, then you will need a bespoke file creation routine such as this:

[ http://www.mcgimpsey.com/excel/textfiles.html#fixedfield ]
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

707 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

13 Experts available now in Live!

Get 1:1 Help Now