Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
itatspectrum
Partner - Contributor II
Partner - Contributor II

Store into CSV with a file per Row?

Hi All,

I'm looking to output a csv from a table in Qlik using the store command, but want a file per row in my table.

CustomerValueQty
ABC0011000100
DEF001200020
XYZ0011500150

So in the example above, I'd like to output 3 csv files, ideally with the Customer Column as the file name.

Any suggestions welcome.

Regards,

Steve

1 Reply
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

Temp:

Load Distinct Customer From XYZ;

Let vCount = noofrows('Temp');

For i=0 to $(vCount)-1

Let vCustomer = peek('Customer',$(i),'Temp');

$(vCustomer):

Load * from xyz where Customer = $(vCustomer);

Store $(vCustomer) into $(vCustomer).csv(txt);

Drop Table $(vCustomer);

Next

Drop table Temp;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!