Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] CSV POINT TO COMMA: . TO ,
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] CSV POINT TO COMMA: . TO ,
 Login/Join
 
Platinum Member
posted
Hi,
even though I am using SET CDN = ON
my csv Output (shown in Texteditor, so no Excel Transformation Problem) does show the '.' in my decimal Fields.
I have no toher Idea to Change that.

My Metadata is out f SQL Path Through....

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 177 | Registered: October 17, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I can see your problem as well. It looks like when I have CDN=ON, if I run the report on my screen it shows , for decimal point. But if I hold it, I still see a dot.

You should probably reach out to IB Tech support to find out if they have a work around or a suggestion on how to handle that.

Just wondering what your system separators in Excel's Options/Advanced are set to. I believe if you set them to the European style, you'll get what you want.

This message has been edited. Last edited by: BabakNYC,


WebFOCUS 8206, Unix, Windows
 
Posts: 1849 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Expert
posted Hide Post
You could use an intermediate TABLE FILE request from the SQLOUT results where you can add the desired formats to the appropriate files and HOLD that result to XLSX. That should work for you.
 
Posts: 3103 | Location: Middle Tennessee | Registered: February 23, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi @Doug, can you just post your code, beacause I don't get your Point.. Would be great!

@BabakNYC How can I set my System Operators to european style??


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 177 | Registered: October 17, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Once you open the csv in Excel.

Then in Excel click File, Options, Advanced. Look for Use System Separators. If you unchcek that box you can pick Decimal Separator and Thousands Separator.


WebFOCUS 8206, Unix, Windows
 
Posts: 1849 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Platinum Member
posted Hide Post
you can,

Hold your calculated data in tem file,
now do another Table file req on hold file and replace . by , comma and print in csv file.


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
 
Posts: 186 | Location: Infobuild India | Registered: August 28, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I suspect your problem is related to the SQL client that you're using; in this case that is IBI's MS SQL adapter.

It wouldn't surprise me if the defaults for those were derived from Windows's Region and Language settings (or NLS settings on most other OS's) of your WFRS machine. Perhaps that is set to use dot for decimals and comma for thousands separator?

And then the WFRS software has a set of NLS settings as well, but I think that's limited to code-pages, but it can't hurt to look.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1663 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks @BabakNYC, but that' to compicated, there Need to be a drect way. Plus I don't want it to open in Excel. In Editor for example it's also wrong and there are no worarounds to replace the . zu ,


@Claudhary: Can you do an examplecode please???


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 177 | Registered: October 17, 2017Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Jenni,
I took simple Car file ,
below is the Webfocus code
 
TABLE FILE CAR
SUM
     SALES/D12.2 AS AB

BY  COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS A
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END
-*SET CDN = ON
TABLE FILE A
PRINT 
-* CONVERTING NUMERIC VALUES IN ALPHANUMERIC TO STORE , IN CSV FOR DECIMAL 
COMPUTE SALE_ALPHA/A15=FTOA(AB,'(D12.2)',SALE_ALPHA); NOPRINT
-*REMOVING COMMA AS D12.2 ADDS THOUSAND  SEPERATOR
COMPUTE SALE_NOCOMMAS/A14=STRREP(15,SALE_ALPHA,1,',',0,'X',14,SALE_NOCOMMAS); NOPRINT
-*CONVERTING DOT INTO COMMA
COMPUTE DOT_TO_COMM/A17=STRREP(14,SALE_NOCOMMAS,1,'.',1,', ',17,DOT_TO_COMM);
BY COUNTRY
ON TABLE HOLD AS BASEAPP/A FORMAT COMT
END
 


CSV output,
 "COUNTRY","DOT_TO_COMM"
"ENGLAND","     12000,00"
"FRANCE","           ,00"
"ITALY","     30200,00"
"JAPAN","     78030,00"
"W GERMANY","     88190,00" 


WF Production :- WF:8.0.0.4, 8.1.05 App-studio/Developer Studio(8.1.x) ,
8.2.0.1M , 8.2.0.2 (App-Studio8.2.x),
InfoAssist/+, InfoDiscovery
Output format:-AHTML, PDF, Excel, HTML
Platform:-Windows 7, 8,10
 
Posts: 186 | Location: Infobuild India | Registered: August 28, 2015Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] CSV POINT TO COMMA: . TO ,

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