|
However Doug, how does one put the single quotes into the CSV file that you've created with CPYTOPCD without a program and before loading it into Excel or 1-2-3 destroy's the leading zeros? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin Douglas Handy <dhandy1@xxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 05/13/2003 04:41 PM Please respond to RPG programming on the AS400 / iSeries To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc: Fax to: Subject: Re: AS400 to EXCEL Mike, >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. Sure it will. Going back to the days of Lotus 1-2-3, you can control the formatting of a cell by a leading character. Place a single apostrophe in front of the text you enter into a cell and it becomes a left-aligned text entry even if the entire data portion are digits. Try it when keying in Excel (or Lotus 1-2-3 <g>) and you'll see what I mean. You should see the little green triangle in the upper left corner of the cell, signifying it is a text formatted cell. It also works on importing text from a CSV, as best I can recall. Lotus had other leading characters which were less commonly used, such as a double quote for a right-aligned text entry, or a caret (^) for a center-aligned text entry. However, Excel won't honor these unless you go to menu Tools -> Options, Transition tab, and check "Transition navigation keys". It honors a leading single quote (') either way. Sometimes you just have to resurrect techniques from 20 years ago! (Or be old enough to know about them...) Doug _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.