Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
lmonincx
Contributor 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

Tags (2)
3 Replies
Highlighted
MVP
MVP

Re: How to load first tab of xls without using the tabname

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

Re: How to load first tab of xls without using the tabname

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

Highlighted
rohit214
Contributor III

Re: How to load first tab of xls without using the tabname

try this

from

xyz.xls

(biff, embedded lables);

Thanks

rohit