Qlik Community

Ask a Question

QlikView Administration

Discussion Board for collaboration on QlikView Management.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
ryanfoster84
Creator
Creator

Storing into CSV with Comma and Double Quotes

Hi,

I need to store my results into a CSV file and have the comma separator and double quotes like the example below:

A,B,C,D,E,F,G,H,I,J,K,L,M

"C","CO","CT","F","A","seed","38","T","F","F","6","6","1"

Currently when I export to CSV using this:

STORE PROD INTO $(vExtData)ref_prod.csv(txt);

DROP TABLE PROD;


I get the following output


A,B,C,D,E,F,G,H,I,J,K,L,M

C,CO,CT,F,A,seed,38,T,F,F,6,6,1

is there away to get the desired results

Labels (2)
6 Replies
kaushiknsolanki
MVP & Luminary
MVP & Luminary

Hi,

Try this.

Load ' " '& Field1 & ' " ' as Field1,

         ' " '& Field2 & ' " ' as Field2

From XYZ;

Then normal Store command.

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
ryanfoster84
Creator
Creator
Author

hi,

no this does not work

A,B,C,D,E,F,G,H,I,J,K,L,M

"""C""","""CO""","""CT""","""F""","""A""","""seed""","""38""","""T""","""F""","""F""","""6""","""6""","""1"""

Miguel_Angel_Baeyens

Use the delimiters and options:

STORE Table INTO File.txt (ansi, txt, delimiter is \t); // for example

EDIT details in help site:

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/ScriptSpecifie...

ryanfoster84
Creator
Creator
Author

I'm not to sure on this would you have an example of how to do this for my issue?

ryanfoster84
Creator
Creator
Author

thanks having read the material and tried numerous things I am still at a lose

Miguel_Angel_Baeyens

See attached on how to use the syntax to save TXT files with quotes.

I don't know your specifications so you will have to see which options best meet your needs.