Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Storing a TXT file without headers in a script

I'm trying to store a table into a TXT file in a script using Store Table into ..Data\TableName.txt (txt);

However I'm getting all kinds of XML information before the data. Is there any way I can store just the raw data?

5 Replies
michael123
Partner - Creator
Partner - Creator

Below code stores a CSV-file with headers in QV11. Which version are you on?

******

T2:

Load * Inline [

EventDate,EventTime,EventType,StaffName

28/11/12,07:33:57,In,AB

28/11/12,08:34:57,In,BC

];

STORE T2 INTO C:\temp\test.txt (txt);

******

Gysbert_Wassenaar

There's no way to directly use STORE to output to a text file without headers. There are a number of solutions available using either macro's or an external vbs script or tool (e.g. sed). If you search the forums you should be able to find more information.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert

Thanks for your help.  I'll abandon that idea and look at a button with a macro attached. Hopefully I'll get somewhere as what I'm trying to do is create a .txt file with one field in it and no headers.

Not applicable
Author

Hi again Gysbert

Found the Export option in the Button properties and set export to records with no formatting of numbers and it works a treat.  Thanks for the heads up!

hugmarcel
Specialist
Specialist

One idea is to use a comment as column label.
E.g. X: load '<binary include path>' as "//column_label" autogenerate 1;
store X into Includefile.txt;

It is then possible to write as first line in a script:

BINARY $(Include=Includefile.txt);

marcel