Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jamajka1
Contributor

Generation of txt file from the script

Hello experts,


could you help me with one issue, please? I want to generate .txt file from the script during the load (in QlikSense). I created a new internal table using by LOAD * INLINE and the generation of .txt file was successful. The issue is that in the file there is a lot of rows named as QvdTableHeader which I do not need and I do not want in the file.


Thank you for any advice,

Maria

1 Solution

Accepted Solutions
h_eskelinen
New Contributor III

Re: Generation of txt file from the script

Hey Mária,

Editing the table is not possible when using the Store command (the table can only be saved with the same data as the internal table). This means you have to make the necessary changes to the table as part of the LOAD command. It sound like you might have an error in your Store statement. Make sure it is of the form:

Store [mytable] into [myfile].txt (txt);


and NOT something like:

Store * into [myfile].txt (txt);

If this doesn't help, please share your script for loading and storing the table.

3 Replies
h_eskelinen
New Contributor III

Re: Generation of txt file from the script

Hey Mária,

Editing the table is not possible when using the Store command (the table can only be saved with the same data as the internal table). This means you have to make the necessary changes to the table as part of the LOAD command. It sound like you might have an error in your Store statement. Make sure it is of the form:

Store [mytable] into [myfile].txt (txt);


and NOT something like:

Store * into [myfile].txt (txt);

If this doesn't help, please share your script for loading and storing the table.

jamajka1
Contributor

Re: Generation of txt file from the script

Hey Henri,

the generation of .txt is okey. The file has been created. It just has a long header in the beggining, so there is no error here.

The script is:

SET vParameter = 2;

Premenna:

Load * INLINE [

Hodnota

$(vParameter)

];

STORE Premenna INTO [lib://tabulecka.txt];

In the meanwhile I have found the solution... there should be added " (txt) " in the end. So the last row should be:

STORE Premenna INTO [lib://tabulecka.txt](txt);

You also wrote it in that way .

Thank you,

Maria

h_eskelinen
New Contributor III

Re: Generation of txt file from the script

Glad you found the solution!