× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Is this also true if the CSV fields are all enclosed in quotes?  Not
apostrophes but quotation marks.
 
The last time I did this, for Excel, I used "  and "," and " for the
beginning, middle, and ending separators.
 
 
like this:
 
"John Smith","001234"  
 
and it worked as I'd expected it to.
 
 
---------------------------------------------------------
Booth Martin   http://www.MartinVT.com
Booth@xxxxxxxxxxxx
---------------------------------------------------------
 
-------Original Message-------
 
From: RPG programming on the AS400 / iSeries
Date: Monday, May 19, 2003 8:34:38 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: AS400 to EXCEL
 
Actually, the leading zeros are there. Excel just chooses to ignore them
in a CSV file, no matter what you try. So when I take this CSV file and
send it, as is, to a customer, they think it's wrong. The fact that they
are there in the text file does not matter in the least, because the file
opens in Excel. If the customer can't see them in Excel, they're not
there.
 
Hence the need to create real live Excel format XLS files. If you can't
beat 'em, join 'em.
 
Mike E.
 
 
 
 
<snip>
I know I point that out every time. As soon as you attempt to export a
file with New Jersey zip codes in it, you will see that Excel will not keep
the leading zeros of a CSV file, no matter what you do. Believe me, I've
tried.
<snip>
 
If you click on Format, Cells, then choose the number tab, then select the
custom category and type the number of zeros that you want (i.e. 00000 for
the zip codes) and then resave it as CSV, then the resulting output CSV
file
will contain the leading zeros. This can be confirmed by opening the CSV
file with notepad. 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.