Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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);
******
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.
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.
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!
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