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     [CLOSED] How can I insert newline characters for csv files.
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] How can I insert newline characters for csv files.
 Login/Join
 
Member
posted
Hello everybody.

I will appreciate you if you can help with this problem:
I am trying to output my data to a csv file.
and I want to manually insert a newline(or enter?sorry my english is poor) character,and I tried a lot :

BY CATE1 AS 'CATE1","shot",CRLF,"","","","","","","","","'

see that I succeeded in output blank columns but however I can't insert a newline though I replaced the 'CRLF' with '\r\n' and anything possible else.

Please Help me !!!...

and forgive my poor english.

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


WebFOCUS 7.6
Linux, CSV

MAN FROM PRC
 
Posts: 2 | Registered: September 26, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
Why do you want to put a CR in yopur CSV file ?

Is this to be added to a title ?

Can you post the whole TABLE request?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6067 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
quote:
Originally posted by Waz:
Why do you want to put a CR in yopur CSV file ?

Is this to be added to a title ?

Can you post the whole TABLE request?


Because the report I want to create contains headers and I found that the header will not be outputed in csv format,so I wanted to insert header by editing the titles.

And this is my whole request,you can ignore the japanese...

-------------------------------------------
-* File REI702B.fex
JOIN 担当者.担当者.担当者番号 IN 担当者 TO MULTIPLE 売上実績.売上実績.担当者番号 IN 売上実績 TAG J0 AS J0
TABLE FILE 担当者
SUM
売上金額
粗利額
BY 地区名
BY 分類名1 AS '分類名1","shot",CRLF,"","","","","","","","","'
BY 担当者名
WHERE 地区名 EQ '&AREA.(FIND 地区名,地区名 IN 売上実績).地区名を選択して下さい.';
WHERE 分類名1 EQ '&CATEGORY.(FIND 分類名1,分類名1 IN 売上実績).商品分類を選択して下さい.';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SAVE FILENAME
"C:\&AREA|地区&CATEGORY|売上.CSV"
FORMAT COMT
---------------------------------------------

Thank you .


WebFOCUS 7.6
Linux, CSV

MAN FROM PRC
 
Posts: 2 | Registered: September 26, 2010Reply With QuoteReport This Post
<JG>
posted
If you want to create a csv file with a header row use format COMT or DFIX
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
format COMT or DFIX
In my 7.7.01 setup format COMT provides column headers, but only on one line and format DFIX does not even give me that.
If you want a complete report with headers, footers and column titles and such, try holding it format WP. That way you still have a columnar hold file, but with all headers and such present. Mind you, no master file will be created, but if you need that you could probably create one yourself.


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
<JG>
posted
Gamp for DFIX

ON TABLE HOLD FORMAT DFIX HEADER YES

Generates the header row

But you are correct using FORMAT WP is the only way you will get a multi-line header
FILEDEF MYFILE DISK MYFILE.CSV
-RUN
DEFINE FILE CAR
HLINE1/A50='"分類名1","shot"';
HLINE2/A50='"","","","","","","","",""';
END
TABLE FILE CAR
"<HLINE1"
"<HLINE2"
BY COUNTRY NOPRINT
ON TABLE SET PAGE NOLEAD
ON TABLE HOLD AS MYFILE FORMAT WP NOCC
END
-RUN
FILEDEF MYFILE DISK MYFILE.CSV (APPEND
-RUN
TABLE FILE CAR
PRINT COUNTRY MODEL
ON TABLE SAVE AS MYFILE FORMAT COM
END
-RUN  
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
HEADER YES

Never too old to learn something new, am I Wink


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How can I insert newline characters for csv files.

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