Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

3 Replies
agigliotti
Partner - Champion
Partner - Champion

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
Champion III
Champion III

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

QlikView Addict: Looping Through Excel Sheets

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

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