Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
aytacbas
Contributor III
Contributor III

How can I load excel multi-sheets to qlikview

hi all;

I have an excel spreadsheet that contains multi sheets and every week will be added to new sheets. İn addition A column will be same every sheets (This column will be key)

how to load this data ?

4 Replies
Not applicable

Hi,

For i=0 to n;

Load * from Table.xls(sheet($i));

next i;

Anonymous
Not applicable

Use SQLTables function and then loop through all of the tables in TABLE_NAME column

agomes1971
Specialist II
Specialist II

LET vStartSheetNumber = 1;

LET vEndSheetNumber = 50;

LET vExcelFileName = 'Data';

// Generate Empty table

Data:

LOAD

          '' AS Data.Field1,

  '' AS Data.Field2

AutoGenerate(0);

FOR index = vStartSheetNumber TO vEndSheetNumber

     Concatenate(Data)

     LOAD

          *

     FROM [$(vExcelFileName).xlsx]

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

NEXT

Note : in my excel file the sheet names are in the patter of Page 1, Page 2, ..... Page n.

Hope this is it.

Regards

André Gomes

Anonymous
Not applicable

let vReportDefinitions=<xls location>;

ODBC CONNECT32 TO [Excel Files;DBQ=$(vReportDefinitions)];

QUalify *;

SQL_Tables:

Load *;

SQLTABLES;

vNoOfRows=NoOfRows('SQL_TABLES');

for i=0 to vNoOfRows-1

  vTablename=peek('SQL_Tables',$(i),'SQL_Tables.Table_Name')

  Load

  *

  From

  vTablename;

Next i;