×
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.
> An old article of Bob Cozzi in MC Press said to use the quote
> function, e.g. =("001") but I get =(001")" in my column. Perhaps
> the quote function will only work for people using CPYTOIMPF.
In order to keep leading zeroes, you'll have to somehow trick Excel into
thinking that your field is a character field. Personally, I think
that's a lot of trickery, because what you're really doing is trying to
use a CSV for a purpose it wasn't designed for. CSV is NOT designed to
be a spreadsheet or an Excel document. CSV is not supposed to imply
any sort of formatting of data.
Consider using XML, HTML, or Excel's native XLS format (via POI) for
your files. They'll give you much more control.
The notion that it's okay to use =("001") from CPYTOIMPF, but not via
the IFS APIs seems strange to me. Obviously Excel has no way of knowing
what you did to create the file! If CPYTOIMPF works, then view your
file and view CPYTOIMPF's output and see what's different. Then change
your call to the write() API to write it exactly the same as CPYTOIMPF
writes it. If the bytes are the same, Excel won't know the difference.
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: CSV - how to keep leading zeros and alignment problems, (continued)
This mailing list archive is Copyright 1997-2025 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.