Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In Data Manager, I selected all sheets from the input file i need to load
However, in Data Load Editor (script), I am forced to specify each sheet name like:
Sheet name is [2023]
Sheet nameis [2024]
My question is:
Why does Data Manager support automatic sheet detection, but script does not?
Is there any way in script to load all sheets from an Excel file without manually specifying sheet names?
Any explanation or best practice would be appreciated.
Thanks.
Hi, you can go to the script editor and in the 'automatically generated section' you can see the script it uses. I don't use Data Manager because I usually work with script editors but if when laoding the file you are selecting all sheets checking the box for each sheet, then they are loaded one by one.
To load all sheets there could be different strategies based on the naming used for the excel sheet.
In example if there is a sheet for each of the last 5 years and the excel name includes the last or first year loaded, you can extract that year from the name and use a bucle for each of the 5 sheets. Same if the names includes some autonumerical.
If the sheets names are unpredictable you can load the excel as a database to use SQLTables to retrieve all sheets:
https://qlikviewcookbook.com/2008/09/loading-multiple-excel-sheets/