Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create txt files without the header using the script.

Hi, everyone!

How are you? I am new with QlikView, but I already have a doubt. I'd appreciate if someone could help me.

I need to convert a txt file into another txt file. No problems with it. I can inform the directory, read all the input files, process the information and generate the new formatted output files. I am doing it in the script level. The problem is that the output files are created with the first line containing a header. I don't want the header. I am using the STORE command. Is there any way to store my data without the header?

I can do it using a buttom with a export action. There is a setup to do it. But I can't use this buttom because there won't be a user to do it. The idea is to have the script run automatically every evening. Can I "hit" the buttom at the script level?

Tks in advance,

Marcelo - from Brazil

13 Replies
Not applicable
Author

Hi,

that only works if there are no null values in your first line.

Regards

Sabine

Not applicable
Author

Hello,

I had to create a file .dat separated by "|" and with no header. First I store in a 'pass file' than using cmd I create a file with no header using string "TRD|" that does not exist on header but only as a fixed field in the stored table:

first I created the following table

LOAD

     'TRD' AS TIPO_RECORD,

     field1,

     field2,

RESIDENT resident_table;

STORE PHOTO INTO PASS_FILE.DAT(TXT, delimiter is '|');

SET cmd=FINDSTR /C:"TRD|" PASS_FILE.DAT > FILE.DAT;

execute cmd.exe /C $(cmd);

set cmd=;

SET cmd=del PASS_FILE.DAT;

execute cmd.exe /C $(cmd);

set cmd=;

remember to allow script to execute external program

Anonymous
Not applicable
Author

Hello,

trying this in a del_header.bat:

Copy FicNameStore FIC.TRA

Find /V /I "header" < FIC.TRA > FicNameStore

Del FIC.TRA

then execute del_header.bat

carlcimino
Luminary
Luminary

This works perfectly.  Thank you.