Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

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

         ' " '& Field2 & ' " ' as Field2

From XYZ;

Then normal Store command.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
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.