Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
hic
Former Employee
Former Employee

If you have labelled a table, you can do a

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

View solution in original post

4 Replies
hic
Former Employee
Former Employee

If you have labelled a table, you can do a

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

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);