Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

itatspectrum
New Contributor

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

Re: Store into CSV with a file per Row?

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