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