?
Solved

want leading  0's in a csv file not xls

Posted on 2013-10-27
5
Medium Priority
?
309 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
[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
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
[ fanpages ] earned 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
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…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

777 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