Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
avastani
Partner - Creator III
Partner - Creator III

Export from Script into Tab delimited file?

Is it possible to export to a tab or CSV delimited file from LOAD Script or MACRO instead of Export to Excel?

11 Replies
Not applicable

you can export a tabe with the ID EXORT with the follow MACRO:

sub exportList
set obj = ActiveDocument.GetSheetObject("EXPORT")


TableName = v.GetContent.String


exportPfad = "C:\QlikView Storage\Production\Adressmanagement_BGZS\08-script\"

FileName = "filename.txt"
'obj.Export FileName, ";"

obj.Export FileName, ";"
obj.ServerSideExport FileName, ";"


end sub

use the function Export for local export ot the function ServerSideExport for export on the server.

prieper
Master II
Master II

Manual: Rightclick and then Export ... instead "Send to Excel". In the Filemenu then you can choose formats.
From the script you can use the STORE-command (with undocumented function) and save as .csv or .txt.

Peter

avastani
Partner - Creator III
Partner - Creator III
Author

STORE-command (with undocumented function) and save as .csv or .txt

--can't use STORE <table> INTO <filename>.csv (csv);

however, .txt works, but it is still encrypted which is not good.

avastani
Partner - Creator III
Partner - Creator III
Author

Hi Dirk,

Tried the suggestion and it does not work either. It fails on set obj = ActiveDocument.GetSheetObject("EXPORT") where my object is a tablebox with id TB01.

Not applicable

Hi Amir!

EXPORT is only a example for a object id. You must apply

obj = ActiveDocument.GetSheetObject("TB01")

or change the ID in the object properties.

Thanks for your resolution with the STORE-command. I will test it today, too.

Not applicable

You can use

Store <filename> into <filename.ext> (txt, delimiter ' \t ') for a csv file with TAB delimiter .

regards

Rajdeep

Not applicable

Rajdeep,

Is there a way to Store the text file without the header line?

Using a buttom I can do it, but I need to do it at the script level, without user action. Any idea?

A consultant told me to use a macro to remove the first line after my text files are created using Store. I don't know if I can do it in a different way.

Tks,

Marcelo

Not applicable

Actually script command is:

Store <filename> into <filename.ext> (txt, delimiter is '\t');

🙂

Not applicable

Hi,

Did you know you can also export to csv? Simply right click on the object and instead of selecting Send to Excel, select Export. This exports to csv which allows you to download more data and it's much quicker.

Screen shot 2011-12-07 at 11.26.35 AM.png

Matt