Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
JoannaM
Contributor III
Contributor III

Export data in script editor to Excel

Hi all

How can I export certain data directly through script editor into excel (Test.xlsx on my Desktop)?

What is the correct store to command?

Temp:
LOAD * INLINE [
Name, Country
Meyer, Germany
Jung, Korea
Ansani, France
Milo,France
];

 

Thanks a lot.

Best regards,

Joanna

1 Solution

Accepted Solutions
Anku
Creator
Creator

@JoannaM 

Do one thing, first import any file from the required location and then use that path to store you csv in the same way.

In your case, you're using the drive name however Qlik uses Lib.

Also, avoid extracting and store the same file and location.

View solution in original post

12 Replies
Gui_Approbato
Creator III
Creator III

Hi,

It is the Store command. You can change the extension of the file at the end (example below using csv)

Store TableName into [lib://ConnectionName/FileName.csv] (txt);

JoannaM
Contributor III
Contributor III
Author

Hi Gui_Approbato

Thanks for the answer.

I tried the path below but it doesn't work. Connection not found: C:...

Store Temp into [lib://C:/Users/myname/Desktop/Test.csv] (txt);

Did I forget to link something somewhere?

Thanks a lot.

BR, Joanna

EliGohar
Partner - Creator III
Partner - Creator III

@JoannaM Did you create a connection for this path folder - C:/Users/myname/Desktop/ ?

If yes, then use the name of the connection:

Store Temp into [lib://[ConnectionName]/Test.csv] (txt);

JoannaM
Contributor III
Contributor III
Author

@EliGohar

Thank you for the input. I manged that yes. Now the error message is gone. When I open now the XLSX file remotly on my desktop the file is empty. I wanted the data to be stored automatically in the XLSX file so I could use the data in the XLSX for further calculations. Is that no possible ?

Thanks a lot.

BR, Joanna

EliGohar
Partner - Creator III
Partner - Creator III

@JoannaM Can you share the script you used to create the file? And did you get an error message when you try to open the file or just empty file?

 

JoannaM
Contributor III
Contributor III
Author

@EliGohar 

I have the following script:

Temp:
LOAD * INLINE [
Name, Country
Meyer, Germany
Jung, Korea
Ansani, France
Milo,France
Mine, Germany
];


store Temp into [lib://AttachedFiles/Test.xlsx];

 

 

My file Text.xlsx file is stored on my folder H:\Test.xlsx.

When I open the folder on my H drive, then the XLSX file is empty.

 

What am I doing wrong?

BR, Joanna

EliGohar
Partner - Creator III
Partner - Creator III

Looks like XLSX format is not supported. 

You can try this (xls format):

Temp:
LOAD * INLINE [
Name, Country
Meyer, Germany
Jung, Korea
Ansani, France
Milo,France
Mine, Germany
];


store Temp into [lib://AttachedFiles/Test.xls](txt);

This is working for me.

Eli.

JoannaM
Contributor III
Contributor III
Author

Hi Eli

I tried the way you did. When I open the path and click on the file attached the data is there:

JoannaM_0-1634627255966.png

However, when I try to open the XLS file on my H drive where I saved it, the file is empty.

Thanks.

BR, Joanna

Anku
Creator
Creator

@JoannaM 

 

Try below

Temp:
LOAD * INLINE [
Name, Country
Meyer, Germany
Jung, Korea
Ansani, France
Milo,France
Mine, Germany
];

Store Temp into [path/filename.csv]

(TXT, delimiter is ',');