Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
lmonincx
Creator II
Creator II

How to load first tab of xls without using the tabname

Hi,

I am wondering if there is a way to load the first sheet from an xlx file.

Reason is that customer is contantly changing the name of the tab.

Now i have:

TableX:

load

@1 as CustomerName,

@2 as CustomerNumber

from

[@data\*filename01.xls]

(biff, no lables, table is [abc$] );

I want the reference of [abc$] to look at the first tab /sheet.

Hope this will be possible.

Kind regards!

Linda Monincx

3 Replies
tresesco
MVP
MVP

You can try creating ODBC connection and then like:

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

SpreadsheetData:

SQLTABLES;

DISCONNECT;

  Let zSheet = Peek('TABLE_NAME',  'SpreadsheetData')

     LOAD *

     FROM $(vReportDefinitions)

     (ooxml, no labels, table is [$(zSheet)]);

Not applicable

Try this,

(biff, no labels, table is @1);

This reads the 1st sheet.

However this method works only for .xls files. For .xlsx you may have to follow tresesco answer.

Thanks,

Prabhu

rohit214
Creator III
Creator III

try this

from

xyz.xls

(biff, embedded lables);

Thanks

rohit