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

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

Load from textfile

Hi,

I'm trying to load data from a text file with little success.

First of all I'm struggeling with the delimitations.

Additionaly I need to figure out a way to apply the correct date to every row when loading into qlikview. Any ideas?

Sample text file attached.

Thanks in advance,

Olle

Capture.JPG.jpg

6 Replies
anbu1984
Master III
Master III

Load @1:200,

If(@1:200 like '*Value Date*',Mid(@1:200,12,10),Peek(Date)) As Date

From [SampleReport.txt] (fix,Header is 6 lines);

Not applicable
Author

Hi Anbu,

can you pls provide a qvv example? Not really sure how to apply this.

Kind regards,

Olle

anbu1984
Master III
Master III

Check this qvw

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

If you use the Table Files... wizard in the script editor, you would use a fixed record file type. Skip 3 header lines and embedded labels (check that you do have label line or change the number of header lines). Set up the fixed field ranges.

Then when you click next, enter the transformation wizard. Here you can create filters to drop the non-data lines. For example, you could exclude all lines where the Code column (looks like column 2) is blank. That would remove the empty lines, ---- lines and totals. The wizard adds a filter clause to the file type statement.

Then these non-data lines never get into your model and you dont need complex rules to remove or exclude them

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Problem is I haven't even managed to load the other data  so I have nothing to apply your solution to   Can you pls provide an example when you've loaded the below? From scratch

LOAD

Account,

Code,

Name,

Amount,

D/C,

Reference,

Value Date

Best regards,

Olle


Not applicable
Author

Thanks for your tip Jonathan!

I did as described and ended up with a nice and clean table!

However, when trying to load this I get the below error message.

Does not matter if I state the embedded label names instead. Same error occurs.

I do not understand why QV uses the @1:18 (and so on) even though labels are stated.

Any ideas what might be wrong here?


Capture.JPG.jpg