Focal Point
[CLOSED] CSV file without quotes

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

January 25, 2017, 05:15 PM
eric.woerle
[CLOSED] CSV file without quotes
Does anyone know if there is a file format that will give me a csv file without a header and without quotes around text? I know there is FORMAT COM but that has quotes around text. There is FORMAT DFIX which allows me to define delimiter, header, etc, but that comes out as wfservlet.ibfs. I'd prefer the file to come out as [file_name].csv. Its possible that I might be able to change a redirection setting somewhere, but I don't know which one I would need to flip.

Any thoughts? Worse comes to worse I'll just have to tell them to save as .csv. But I'd prefer to not have to do that.

Thanks!

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


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
January 25, 2017, 06:29 PM
CoolGuy
Try COMMA.

RC formats

Usually pumps out in Excel with no headers or quotes.


8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
January 26, 2017, 10:21 AM
Clif
I wouldn't use COMMA. Not only does it enclose character values in double quotes, it pads them to the full length of the field.

I would suggest using DFIX. By default it creates a file with extension FTM. You can change that with a FILEDEF

FILEDEF filename DISK baseapp/filename.csv

TABLE FILE ...
ON TABLE HOLD AS filename FORMAT DFIX DELIMITER ,


N/A
January 26, 2017, 12:01 PM
eric.woerle
I didn't think about using filedef. The one problem though is that the user has to download the file and Filedef won't work with a PCHOLD...


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
January 26, 2017, 01:48 PM
Kevin Patterson
Eric, are you working on the eNC3 file? I am too. I've managed to get a file to pass the test in the portal. I used COMMA, then had to do a little further manipulation in Excel. But I got there without too much hassle.

I am putting together my WebFOCUS code and instructions to send out to the SSAFinance listserve.


Kevin Patterson
Appalachian State University
WebFOCUS 7.7.03
Windows, All Outputs
January 26, 2017, 02:43 PM
Waz
You can always post process the file if you HOLD it.

Then use HTMLFORMTYPE and HTMLFORM to return it


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 27, 2017, 04:46 PM
eric.woerle
Waz,

using HTMLFORM returns it to the screen. I've also seen people mention using edaget, which unfortunately is also returning it to the screen. I need the file to download.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
January 27, 2017, 05:16 PM
eric.woerle
Somethings I've tried with no joy Frowner Both of these output to the screen instead of prompting for download

FILEDEF MOODLE_GRADES DISK foccache/moodle_grades.csv
TABLE FILE CAR
SUM CAR
BY COUNTRY
ON TABLE HOLD AS MOODLE_GRADES FORMAT DFIX
	DELIMITER ,
	HEADER NO
	PRESERVESPACE NO
END
-RUN

-MRNOEDIT EX EDAGET TXT,foccache/moodle_grades.csv,T
-* also this

FILEDEF MOODLE_GRADES DISK foccache/moodle_grades.csv
TABLE FILE CAR
SUM CAR
BY COUNTRY
ON TABLE HOLD AS MOODLE_GRADES FORMAT DFIX
	DELIMITER ,
	HEADER NO
	PRESERVESPACE NO
END
-RUN

-SET HTMLFORMTYPE = CSV

-MRNOEDIT -HTMLFORM MOODLE_GRADES 



Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
January 29, 2017, 03:45 PM
Waz
Have you checked the mime settings for csv in the admin console ?

Thinking you could de-associate csv with an application and it may download or give you the option to download.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

January 31, 2017, 08:13 AM
Tamra
Eric,

Have you tried DFIX with ON TABLE SAVE....
Add a FILEDEF to where you want the file to be saved.

TABLE FILE CAR
PRINT SALES BY COUNTRY
ON TABLE SAVE AS DF01 FORMAT DFIX DELIMITER ' '
END

Thank your for participating in the Focal Point Forum.

Tamra Colangelo
Focal Point Moderator
Information Builders


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
February 06, 2017, 12:53 PM
eric.woerle
Tamra,

Please see my last post. I am currently using DFIX which is FTM output. I'm trying to change the file type from ftm to csv so the user doesn't need to do a save as and remember to change the extension.

Waz,

yes, I tried de-associating csv in the mime settings and it didn't have any effect.

I ended up just putting a note on the launch page telling the user to change the file extension to csv. Its not clean, but its not worth spending to much time on either. I think users can handle a "Save As" process. I just prefer to do things "cleaner" when possible.

Maybe I should add a NFR to add the ability to define the file extension for DFIX since you can define the delimiter, header, etc already.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2