If all these spreadsheets have the same in structure (field names), then in the load script just use the "concatenate" keyword between each spreadsheet load. This will create one large table in memory.
more info here: Understanding Join, Keep and Concatenate
Ah yes, Jose brings up a good point. I was assuming the list of spreadsheets was predetermined. if you need to scan a folder, for example, for files to load you can use this:
for each FileExtension in 'xls','xlsx'
for each FoundFile in filelist(Root & '\*.' & FileExtension)
'$(FoundFile)' as [FilenameWithPath],
'$(FileExtension)' as [Extension]
for each SubDirectory in dirlist(Root & '\*')
more info here: loop through to load all files from a folder and its subfolders?
Just to clarify what Ian stated - if the structure is the same (# of columns and field names) - they will automatically CONCATENATE together in to one common data table in the Qlik Sense app - there is no need to use the CONCATENATE keyword.
See the attached example - using a simple .xls file with two tabs - each tab is the same.
However YOU CAN ALSO (if need be) add a new column to the data identify the appropriate data using script. For example - tab1 is year 2000 data, tab2 is year 2001. Note I used script to add the appropriate year for each tab in the sheet. So it looks like this:
LOAD '2000' as Year, ID, amount FROM [lib://QlikSense/test_data.xlsx] (ooxml, embedded labels, table is [Tab1-2000]); LOAD '2001' as Year, ID, amount FROM [lib://QlikSense/test_data.xlsx] (ooxml, embedded labels, table is [Tab2-2001]);
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.