Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hiya,
I'm trying to load 4 spreadsheets into Qlik sense, one of the tables has headings and the other 3 don't.
Is there a way to load them in using the 1st spreadsheet's headings? I found a script from qlikview but can't work out how to adapt it for qlik sense.
It may be as simple as I just need a paths list, but I'm not sure, so all help is welcome.
This is what I've got and then at the end of my data load I have this but it doesn't like it.
I have thousands of rows of data and about 30 columns so don't want to have to manually change them in the script.
Thanks!!
Do all your files have the columns in the same order?
If so, then you could just skip headers all-together.
I have written code which checks dynamically checks header size which you would just have to loop
//have found that the header size occassionaly varies depending on how the report was exported, have add the below section to allow for this dynamically.
[getHeader]:
LOAD
A,
RowNo() as RowNum
FROM [$(vFile)]
(ooxml, no labels, table is Report1);
[getHeader_2]:
NoConcatenate LOAD
A,
RowNum
Resident CurrentRentRoll_getHeader
where A = 'FIELD_HEADER';
Let vHeaderSize = peek('RowNum',0,'getHeader_2')-1;
drop table getHeader, CurrentRentRoll_getHeader_2;
LOAD
*
FROM [$(vFile)]
(ooxml, embedded labels, header is $(vHeaderSize) lines, table is Report1)