Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sasiparupudi1
Master III
Master III

Is it possible to export records into a CSV file using qlikview script?

I have a situation where I am reading records from different tables and I want to write them into a CSV file. Please let me know if there is any way to achieve this?

Thanks in Advance

Sasi

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III
Author

Hi  Ronald

Thanks for your post and I learned a new trick . But I found the answer I am actually looking for in the following post where the data in the variables are loaded into a table.

Re: Generating a inline table with last date of each month of a year

Thanks

Sasi

View solution in original post

6 Replies
petter
Partner - Champion III
Partner - Champion III

You can use the STORE statement at the end of your load script:

STORE [myTable] INTO [myTable.CSV] (txt);

ronald_gdi
Contributor III
Contributor III

In the Edit Scripts you can use this:

FOR i = 0 to NoOfTables() - 1

    LET vTableName = TableName($(i));

    LET vOutfile = '$(vTableName)' & '_' & '$(vPeriodo).csv';

    STORE [$(vTableName)] INTO [$(vOutfile)] (ansi, txt, delimiter is ';');

NEXT   

The script list all tables on the QVW and export a csv file.

King Regards!

sasiparupudi1
Master III
Master III
Author

Hi

I do not have the data in one table. I draw fields from multiple tables based on some logic and want to create a new table with the fields in a loop but I am not able to do that.So, I thought of writing the field values into a csv file and reload it as a table. I hope I am making sense here.

MarcoWedel

please post some sample data of your source tables and the expected resulting table.

Maybe there is no need for an export/import to achieve your intended data model.

thanks

regards

Marco

sasiparupudi1
Master III
Master III
Author

Hi  Ronald

Thanks for your post and I learned a new trick . But I found the answer I am actually looking for in the following post where the data in the variables are loaded into a table.

Re: Generating a inline table with last date of each month of a year

Thanks

Sasi

ngulliver
Partner - Specialist III
Partner - Specialist III

Hi, Sasidhar.

Have a look at this short blog on exporting to CSV.

http://www.quickintelligence.co.uk/write-csv-qlikview-store/

regards,

Neil