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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to start a load at a certain row?

I've got some messy raw data that I need to load into QV and I'm not really sure what to do. Basically, I want the load to begin at the first row where the third column is "Account Number" and I want it to load everything below that until there is a blank row. The raw data looks something like this:

Random Header | Something Else Random | More Random Stuff

Random Data| More Random Stuff | Even more random stuff

^^

^^

^^

First Row I want to load | Another header I want loaded | <<

Data (want loaded)

Data (want loaded)

Data (want loaded)

blank (don't want loaded)

I'm sure the "table" above is unreadable, but the point is that I don't actually know what row "First Row I want to load" is on because there could be 6 rows of random data above it or there could be 6000....

Any help would be greatly appreciated. I think I need a while or something but I've never really understood how to use while....

Thanks.

2 Replies
Not applicable
Author

Hi,

I guess you have to load the entire file in a temp table and then load another one with the expected data. Can you post a little example of the file?

Not applicable
Author

Hello trent.jones,

if you don't know in which row to start (and stop) try this code snippet for excel-files correspondending to your demands above as I understood them:

StartTbl:
LOAD
recno() as Start
FROM
[42288. Start from row.xlsx] (ooxml, embedded labels, table is Tabelle1)
WHERE(Col3 = 'Account Number');

LET vStart= Peek('Start');
//LET vEnd = Peek('End'); similar to vStart


LOAD
*
From
[42288. Start from row.xlsx] (ooxml, embedded labels, table is Tabelle1)
WHERE(recno() >= $(vStart)
// AND recno() <= $(vEnd)
);


Regards

Roland