Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kellymcgrady
Contributor

How to get multiple sheets from excel in one load statement

Okay so I need to get multiple sheets from one excel file in one load statement. The one that was working and now doesn't is the

(ooxml, embedded labels, table is ' ') and ive tried @1 and @2.

Tags (2)
3 Replies
agigliotti
Honored Contributor II

Re: How to get multiple sheets from excel in one load statement

use concatenate statement to append all sheets in the same table using a LOAD statement for each sheet.

OR

LET vStartSheetNumber = 1;

LET vEndSheetNumber = 50;

LET vExcelFileName = 'Data';

FOR index = vStartSheetNumber TO vEndSheetNumber

     Concatenate(Data)

     LOAD

          *

     FROM [$(vExcelFileName).xlsx]

     (ooxml, embedded labels, header is 10 lines, table is [Sheet $(index)]);

NEXT

of course your sheets should be named as "Sheet 1", "Sheet 2", "Sheet 3" and so on...

i hope this helps.

vinieme12
Esteemed Contributor II

Re: How to get multiple sheets from excel in one load statement

See this post , this does not require sheet names to be in a specific format

QlikView Addict: Looping Through Excel Sheets

kellymcgrady
Contributor

Re: How to get multiple sheets from excel in one load statement

Unfortunately I cannot change the name of my sheets and they are not labeled with numbers