Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default How do i save a csv file to keep leading zeros please?

nI wish to save a list of numbers that have leading zeros for use as data in
a notepad file. When i change the file from xls to csv it drops off the
leadibg zeros. I have tried formatting everything as text but when you save
to csv it changes the format back to general. Can you help please?There are
two fields in the data base
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default How do i save a csv file to keep leading zeros please?

Put a single quote ' at the beginning of every cell containing text (this
includes your numbers with leading zeros). The single quote will be dropped
when the file is exported to .csv format, but the leading zeros will be
retained.

Hope this helps,

Hutch

"kingie" wrote:

nI wish to save a list of numbers that have leading zeros for use as data in
a notepad file. When i change the file from xls to csv it drops off the
leadibg zeros. I have tried formatting everything as text but when you save
to csv it changes the format back to general. Can you help please?There are
two fields in the data base

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default How do i save a csv file to keep leading zeros please?

Hi Tom,
Sorry to say this didn't work for me it did the same as before, dropping the
@ and the leading zeros, any other ideas? Thanks for helping.
Regards
Kingie

"Tom Hutchins" wrote:

Put a single quote ' at the beginning of every cell containing text (this
includes your numbers with leading zeros). The single quote will be dropped
when the file is exported to .csv format, but the leading zeros will be
retained.

Hope this helps,

Hutch

"kingie" wrote:

nI wish to save a list of numbers that have leading zeros for use as data in
a notepad file. When i change the file from xls to csv it drops off the
leadibg zeros. I have tried formatting everything as text but when you save
to csv it changes the format back to general. Can you help please?There are
two fields in the data base

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default How do i save a csv file to keep leading zeros please?

Are you checking by opening the .csv file in Excel? Excel will always, by
default, treat a value like 000034 as a number, not text. Open the .csv
file in Notepad or Wordpad, and I think you see that it did keep the leading
zeros. To open the file in Excel, first change the file extension from .csv
to .txt This will cause the Text Import wizard to launch. Using the wizard,
you can specify that it is a text field.

Regards,

Hutch

"kingie" wrote:

Hi Tom,
Sorry to say this didn't work for me it did the same as before, dropping the
@ and the leading zeros, any other ideas? Thanks for helping.
Regards
Kingie

"Tom Hutchins" wrote:

Put a single quote ' at the beginning of every cell containing text (this
includes your numbers with leading zeros). The single quote will be dropped
when the file is exported to .csv format, but the leading zeros will be
retained.

Hope this helps,

Hutch

"kingie" wrote:

nI wish to save a list of numbers that have leading zeros for use as data in
a notepad file. When i change the file from xls to csv it drops off the
leadibg zeros. I have tried formatting everything as text but when you save
to csv it changes the format back to general. Can you help please?There are
two fields in the data base

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default How do i save a csv file to keep leading zeros please?

Hi Tom,
Thanks for your help, I now have two fields containing leading zeros. Will
try on the print programme at work tomorrow.
Thanks again best regards,
Kingie

"Tom Hutchins" wrote:

Are you checking by opening the .csv file in Excel? Excel will always, by
default, treat a value like 000034 as a number, not text. Open the .csv
file in Notepad or Wordpad, and I think you see that it did keep the leading
zeros. To open the file in Excel, first change the file extension from .csv
to .txt This will cause the Text Import wizard to launch. Using the wizard,
you can specify that it is a text field.

Regards,

Hutch

"kingie" wrote:

Hi Tom,
Sorry to say this didn't work for me it did the same as before, dropping the
@ and the leading zeros, any other ideas? Thanks for helping.
Regards
Kingie

"Tom Hutchins" wrote:

Put a single quote ' at the beginning of every cell containing text (this
includes your numbers with leading zeros). The single quote will be dropped
when the file is exported to .csv format, but the leading zeros will be
retained.

Hope this helps,

Hutch

"kingie" wrote:

nI wish to save a list of numbers that have leading zeros for use as data in
a notepad file. When i change the file from xls to csv it drops off the
leadibg zeros. I have tried formatting everything as text but when you save
to csv it changes the format back to general. Can you help please?There are
two fields in the data base

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
VBA for file save as SharonP. Excel Discussion (Misc queries) 4 May 11th 06 01:16 PM
default save as file type does not work gregf Excel Discussion (Misc queries) 5 February 10th 06 07:50 PM
Cannot save Project file as MS Access file Jumpinjackflash Excel Discussion (Misc queries) 1 January 11th 06 11:35 PM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"