Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Saving into a CSV file froma script

My people

I would like to know how can one save into a CSV file not from the front end but put that as part of the script? I have been told it is possible and I wana try it out myself and see.

1 Solution

Accepted Solutions
Henric_Cronström

If you have labelled a table, you can do a

Store <Table> into Filename.csv (txt) ;

View solution in original post

4 Replies
Henric_Cronström

If you have labelled a table, you can do a

Store <Table> into Filename.csv (txt) ;

View solution in original post

Not applicable
Author

Thanks Henric that worked

Zaga_69
Creator
Creator

Hi,

 

I am using the following code to get a list of a filed from a QVD. Then, I would like to save it as an excel file. However, the storing part does not work, since the file stored is corrupted and cannot be opened by Excel. Any idea?

Table_Temp:
LOAD *
FROM [lib://.qvd]
(qvd);

FOR i = 1 to NoOfFields('Table_Temp')
Fields:
LOAD
FieldName($(i),'Table_Temp') as Facts_GMD_FieldName
AutoGenerate 1;
NEXT i;

STORE Fields INTO [lib://**\**\Facts_GMD_FieldName.csv (txt)];
DROP TABLE Table_Temp;

 

many Thanks!

Ana1
Contributor
Contributor

Hello Edifiayo,

Try moving the (txt) part outside of the square bracket.

Before

STORE Fields INTO [lib://**\**\Facts_GMD_FieldName.csv (txt)];

After

STORE Fields INTO [lib://**\**\Facts_GMD_FieldName.csv](txt);