Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
QS_User_2019
Contributor II
Contributor II

Load Multiple Excel Sheets

Hi All,

 

I am new to QS and try to load two excel files. Each excel files contain three sheets. These excel files name 2018 and 2019. The sheets name for those excel files are 07, 08 and 09. I would like to create two Tables in QS but not sure why it will combine into one Table after loading below script. Can anyone help me to check? Thank you.

 

LET vStartSheetNumber2019 = 7;
LET vEndSheetNumber2019 = 9;
FOR index2019 = vStartSheetNumber2019 TO vEndSheetNumber2019

2019:
LOAD
*,
'2019' as [Year]
FROM [lib://Data/2019.xlsx]
(ooxml, embedded labels, table is [$(index2019)]);
Next


LET vStartSheetNumber2018 = 7;
LET vEndSheetNumber2018 = 9;
FOR index2018 = vStartSheetNumber2018 TO vEndSheetNumber2018

2018:
LOAD
*,
'2018' as [Year]
FROM [lib://Data/2018.xlsx]
(ooxml, embedded labels, table is [$(index2018)]);
Next

10 Replies
mikkeltaylor
Creator II
Creator II

Hi , I don't see any of the replies trying to understand what exactly you are trying to do....  

Why do you need two tables and what are you intending to do with them?  If you keep them all as one table then it will be very easy to work with them in the Qlik front end using 'Set Analysis' or standard filters.  If you need to store they data out then again this can easily be done in a single table and written into a qvd or csv.

Let us know the answers and we can best advise on the solution

Thanks

Michael