Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
somebody can help me?
This is my question:
How do I export a table directly from the QlikView script in a txt or csv file?
Thank all
Hi Sbuzi,
please take a look at this:
(From the HELP):
A QVD or a CSV file can be created by a store statement in the script. The statement will create an explicitly named QVD or CSV file. The statement can only export fields from one logical table. The text values are exported to the CSV file in UTF-8 format. A delimiter can be specified, see load. The store statement to a CSV file does not support BIFF export.
where:
*fieldlist::= ( * | field ) { , field } ) - A list of the fields to be selected.
Using * selects all fields.
field::= fieldname [ as aliasname ]
format-spec ::= ( ( txt | qvd ) )
The format specification consists of a the text txt for text files, or the text qvd for qvd files. If the format specification is omitted, qvd is assumed.
fieldname is a text that is identical to a field name in the table. (Note that the field name must be enclosed by straight double quotation marks or square brackets if it contains e.g. spaces.)
aliasname is an alternate name for the field to be used in the resulting QVD or CSV file.
table is a script labeled, already loaded table to be used as source for data.
filename is the name of the target file. The interpretation of file name is similar to names in load statements, i.e. the directory statements apply.
Store mytable into xyz.qvd (qvd);
Store * from mytable into xyz.qvd;
Store Name, RegNo from mytable into xyz.qvd;
Store Name as a, RegNo as b from mytable into xyz.qvd;
store mytable into myfile.txt (txt);
store * from mytable into myfile.txt (txt);
(The two first examples have identical function.)
Hi Sbuzi,
please take a look at this:
(From the HELP):
A QVD or a CSV file can be created by a store statement in the script. The statement will create an explicitly named QVD or CSV file. The statement can only export fields from one logical table. The text values are exported to the CSV file in UTF-8 format. A delimiter can be specified, see load. The store statement to a CSV file does not support BIFF export.
where:
*fieldlist::= ( * | field ) { , field } ) - A list of the fields to be selected.
Using * selects all fields.
field::= fieldname [ as aliasname ]
format-spec ::= ( ( txt | qvd ) )
The format specification consists of a the text txt for text files, or the text qvd for qvd files. If the format specification is omitted, qvd is assumed.
fieldname is a text that is identical to a field name in the table. (Note that the field name must be enclosed by straight double quotation marks or square brackets if it contains e.g. spaces.)
aliasname is an alternate name for the field to be used in the resulting QVD or CSV file.
table is a script labeled, already loaded table to be used as source for data.
filename is the name of the target file. The interpretation of file name is similar to names in load statements, i.e. the directory statements apply.
Store mytable into xyz.qvd (qvd);
Store * from mytable into xyz.qvd;
Store Name, RegNo from mytable into xyz.qvd;
Store Name as a, RegNo as b from mytable into xyz.qvd;
store mytable into myfile.txt (txt);
store * from mytable into myfile.txt (txt);
(The two first examples have identical function.)
Thank swuehl
very, very good
Thank
I was able to save my file, but all the information was saved in just one column. Is it possible to save using script and get a regular one header one column in csv type file ?