Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
guptanupur
New Contributor II

How can I export data model from qlik sense into csv or excel file???

Hi ,

I have an .qvf file with 200 tables in it . I would like to know if it is possible to export these tables into .csv or .xls  from QLIK SENSE ??

Can any one help me out with this??

4 Replies
MVP & Luminary
MVP & Luminary

Re: How can I export data model from qlik sense into csv or excel file???

You can export tables in the script to csv format using the STORE command. You can export the data from charts and tables in the front end to excel by right clicking the chart or table and select the Export option.


talk is cheap, supply exceeds demand
undergrinder
Valued Contributor II

Re: How can I export data model  from qlik sense into csv or excel file???

Hi Nupur,

This may help you:

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/TableFunctions/table-fun...

From the link:

//Iterate through the loaded tables

For t = 0 to NoOfTables() - 1


//Iterate through the fields of table

For f = 1 to NoOfFields(TableName($(t)))


     Tables:

      Load TableName($(t)) as Table,

          TableNumber(TableName($(t))) as TableNo,

           NoOfRows(TableName($(t))) as TableRows,

           FieldName($(f),TableName($(t))) as Field,           FieldNumber(FieldName($(f),TableName($(t))),TableName($(t))) as FieldNo Autogenerate 1;

     Next f

Next t;


You can get all table name, and then you can store it in csv with store command.



G.


Quy_Nguyen
Contributor III

Re: How can I export data model from qlik sense into csv or excel file???

If you have the rights to reload that application, put these line of code at the end of Data Script load:

For i = 1 to nooftables() - 1

    Let vTableName = tablename($(i));

    Store $(vTableName) into [lib://Your_Connection_Name/$(vTableName).csv](txt);

Next

If you dont have the data source to reload that application, you have to create a new application, do "binary load" from that qvf file, then excute the codes above in the new application.

For binary load, check:

Correct Syntax for Binary load in Qlik Sense

martin_cevela
New Contributor III

Re: How can I export data model from qlik sense into csv or excel file???

Hi,

Do you know how to limit this export/store only to First N rows ?