|
I read this somewhere, not sure if it will work for you (or for anybody for that matter)... But if your writing this csv with rpg, try placing an invisible ascii character after your number, for example The ascii code 160, is a space looking character, but it's not a space, so excel will not try to re-format it. eval outstring = '01234'+char(160) /* i'm not sure what hex ebcidec value you would have to use... It should trick excel into thinking its a text string, and not remove the leading zero... Tim > -----Original Message----- > From: Douglas Handy [SMTP:dhandy1@xxxxxxxxxxxxx] > Sent: Tuesday, May 20, 2003 11:39 AM > To: RPG programming on the AS400 / iSeries > Subject: Re: AS400 to EXCEL > > Booth, > > >Would Excel then decide that all the columns are character, and > >move numbers in as text? > > No. It looks at it a cell at a time, not per column, unless you are using > the > import wizard to set column types. For example, this input: > > "Field1","Field2" > "ABC","DEF" > "XYZ","123" > > results in cell B3 having the numeric value 123. Turn around and resave > the > file, and the third row is written as: > > "XYZ",123 > > 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. This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy the message.
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.