#1   Report Post  
Tim_nol
 
Posts: n/a
Default CSV leading zeroes

I have an app that exports data as CSV. Certain fields contain leading
zeroes. When the CSV is opened in Excel the Leading Zeroes are dropped. I
do not want to have any manual intervention. Is there a way to change a
setting in Excel to treat fields with leading zeroes as text and preserve the
fields as is.

Thanks.
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

You would need either to rename it to *.txt, that will trigger the text
import wizard where you can select the import as text and keep leading zeroes
or use dataget external dataimport text file, then select *.* (all files)
and open it from there, that will also trigger the text import wizard.

Regards,

Peo Sjoblom

"Tim_nol" wrote:

I have an app that exports data as CSV. Certain fields contain leading
zeroes. When the CSV is opened in Excel the Leading Zeroes are dropped. I
do not want to have any manual intervention. Is there a way to change a
setting in Excel to treat fields with leading zeroes as text and preserve the
fields as is.

Thanks.

  #3   Report Post  
mixa
 
Posts: n/a
Default

just append an equal sign ("=")in front of the field you want leading
zeroes preserved.


Peo Sjoblom wrote:
You would need either to rename it to *.txt, that will trigger the

text
import wizard where you can select the import as text and keep

leading zeroes
or use dataget external dataimport text file, then select *.* (all

files)
and open it from there, that will also trigger the text import

wizard.

Regards,

Peo Sjoblom

"Tim_nol" wrote:

I have an app that exports data as CSV. Certain fields contain

leading
zeroes. When the CSV is opened in Excel the Leading Zeroes are

dropped. I
do not want to have any manual intervention. Is there a way to

change a
setting in Excel to treat fields with leading zeroes as text and

preserve the
fields as is.

Thanks.


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
numbers and text in Excel to read as text keeping the leading zer. Ralph Excel Discussion (Misc queries) 2 December 10th 04 07:05 PM


All times are GMT +1. The time now is 12:27 PM.

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

About Us

"It's about Microsoft Excel"