Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
venkey2847
Contributor II
Contributor II

How to load data with string from text file into qlikview

Hi All,

Here I am attaching an one text file ,it is having multiple tables of data in between tables there is some lines of strings.

how to load with this type of data into qlikview, could you please anyone suggest me to do that.

Thanks in advance.

 

regards

venkey.

2 Replies
chrismarlow
Specialist II
Specialist II

Hi Venkey,

You need to start with the wizard & work from there.

So step 1 - it looks like tab delimited, is that right? If so then is there data you need in top left red box? If not you can use header size (6 lines) & labels (embedded labels) to pick the headings out.

1509758.png

You would then be looking for a field that is populated on all rows you want to keep to filter (CoCd maybe).

If you do need data from top left you will need to manually name your fields and use the transformation steps further on in the wizard.

Hope this helps.

Cheers,

Chris.

cwolf
Creator III
Creator III

1. Your text file contains blocks of 65 lines each.
2. Each data line is longer than 42 characters.

This will allow you to load the file as follows:

INPUT:
LOAD
RowNo() & Line as Line
Where LineNoInBlock>6 and LenOfLine>42;
LOAD
Mod(RecNo()-1,65) as LineNoInBlock,
Len([@1:n]) as LenOfLine,
[@1:n] as Line
FROM [.\Test data.txt](fix, unicode, no labels);

DATA:
LOAD *
From_Field('INPUT','Line')(txt, no labels, delimiter is '\t', msq);

DROP Table INPUT;

RENAME Fields
@1 to RowNo,
@2 to [Alt Reference Number],
@3 to [Base Amount in F.Crcy],
@4 to [Business PartnerName],
...