Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I have a folder connected to my Qlik Sense Enterprise cloud where i have placed multiple excel files. My excel files contain multiple sheets with each sheet has different data and different number of columns. The problem arises when i try to upload them automatically using the script. It only loads the first sheet and gives an error in loading other sheets. what should be included in script for load multiple sheets from an excel file?
Currently the load script which is working correctly to load single sheet file is below:
SET vFolderPath = 'lib://....*...*...';
FOR Each vFile IN FileList('$(vFolderPath)\*.xlsx')
TRACE Loading File: $(vFile);
You need to add 'table is ', and then specify the sheet name. If you have multiple sheets, then create a variable and then loop through them. If your sheets are 'Sheet1', 'Sheet2', 'Sheet3' etc, then set the loop, and then within the loop create the variable (we could call it vSheetName) as 'Sheet' & loop number... then just reference that in your load statement:
FROM [$(vFile)] (ooxml, embedded labels, header is 1 lines, table is $(vSheetName));
This is the simple case, if you know the sheet names.