Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

sasiparupudi1
Honored Contributor 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
Honored Contributor III

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

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
MVP
MVP

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

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

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

ronald_gdi
New Contributor III

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

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
Honored Contributor III

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

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.

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

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
Honored Contributor III

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

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

Partner
Partner

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

Hi, Sasidhar.

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

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

regards,

Neil