IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    CSV with the PRECEDING 0's
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Gold member
Posted
Hi

I am creating a CSV file , where i have fields with alphanumeric and numeric values. The numeric values with the preceding 0's are trimmed off while opening in the CSV format. Actually when the same file is opened in a TEXTPAD or NOTEPAD we could see the data correctly .

Can you please tell me whether anything can be done to avoid this scenario. ??(Still i want to open it in the CSV).


Thanks
Naveen

WF 7.1.6 - Oracle 10g
 
Posts: 87 | Location: India | Registered: March 29, 2007Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
Navin

what precisely is correct?
do you want the leading zero's or don't you want them
can you try to include an example of the masterfile and the fex and the result?

Frank




Frank

prod: WF 7.6.5 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.5 on the same platform and databases,IE7

 
Posts: 1631 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Naveen,

Numerics with a L in the format will retailn leading zeroes:

P6L
I9L
D10.2L
etc..


Tom Flynn
WebFOCUS 5.2.2 thru 7.6.x
Windows, Unix, MVS
 
Posts: 668 | Location: Richmond, VA | Registered: January 31, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Naveen
If you have a csv file like:

text1;text3;001234;
text2;text4;0012345;

I only know one way to retain the leading zeroes. Not perfect.

Save the file as a .txt instead of .csv. Import the file into Excel and when asked for the Data format for each column, set the numerics with leading zeroes to Text.

Otherwise try to create a macro to change the format of the cells which you want with leading zeroes to a CUstom format with 0000000, or whatever.

This is of course an Excel issue, not a WebFOCUS issue.


Alan.
WF 7.6.5, PMF 5.1, MRE,RA,RG, etc... Win2003(8xQuad)/IIS/Tomcat with SSL and AD security.
 
Posts: 848 | Location: Portugal | Registered: February 07, 2007Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
When you say 'see the data correctly', means all zeros you want are there. When you are opening CSV, what are you using - EXCEL, some other spreadsheet? As stated by others, it's a spreadsheet thing, not displaying leading zeros.


Leah
 
Posts: 1307 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteEdit or Delete MessageReport This Post
Gold member
Posted Hide Post
As said,
I understand that this is an EXCEL limitation. So we did an workaround like

Concatenating a single quote "'" before the value like

'00q

So when opening the file in CSV mode we wil be getting the data as '00q but in EXCEL we will be getting like 00q.

As of now we are ok with this.
If anyone has anyother workarounds plz do share.


Thanks
Naveen

WF 7.1.6 - Oracle 10g
 
Posts: 87 | Location: India | Registered: March 29, 2007Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    CSV with the PRECEDING 0's

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.