Focal Point
[SOLVED] CSV POINT TO COMMA: . TO ,

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9147054096

June 28, 2018, 10:04 AM
jenni
[SOLVED] CSV POINT TO COMMA: . TO ,
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
June 28, 2018, 10:54 AM
BabakNYC
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
June 28, 2018, 12:20 PM
Doug
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.
June 29, 2018, 02:41 AM
jenni
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
June 29, 2018, 06:12 AM
BabakNYC
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
June 29, 2018, 07:07 AM
Chaudhary
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
June 29, 2018, 09:32 AM
Wep5622
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 :
July 02, 2018, 05:00 AM
jenni
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
July 05, 2018, 12:18 PM
Chaudhary
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