Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading data from excel

Hi All,

When we load data from an excel file like:

LOAD *
FROM
[\..\..\ABC.xls]
(
biff, embedded labels, table is [Qlikview$]);

Is it possible to store the table name Qlikview in a field?

Thanks,

Asma

1 Solution

Accepted Solutions
Gysbert_Wassenaar

LOAD *, 'Qlikview' as SheetName
FROM
[\..\..\ABC.xls]
(
biff, embedded labels, table is [Qlikview$]);


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
Gysbert_Wassenaar

LOAD *, 'Qlikview' as SheetName
FROM
[\..\..\ABC.xls]
(
biff, embedded labels, table is [Qlikview$]);


talk is cheap, supply exceeds demand
Not applicable
Author

If the sheet name is stored in a variable,

e.g.Let vSheetName='Qlikview',

then is it possible to store the value of this variable in a field. Instead of hardcoding 'Qlikview' as SheetName, is it possible to read the value from the variable vSheetName and store it in the field SheetName

Gysbert_Wassenaar

Yes.

LOAD *, '$(vSheetName)' as SheetName

FROM

[\..\..\ABC.xls]

(biff, embedded labels, table is [$(vSheetName)]);


talk is cheap, supply exceeds demand
neha_sri
Creator III
Creator III

Hi Asma,

Yes, you can do so...

Let vSheetName='Qlikview'

LOAD *,

'$(vSheetName)'    as  SheetName

FROM
[\..\..\ABC.xls]
(
biff, embedded labels, table is [Qlikview$]);

This should work.

Regards

Not applicable
Author

I tried using the code which you mentioned, but it is giving me an error

Cannot locate table in BIFF file.

The table Qlikview is present in the file.

Gysbert_Wassenaar

The sheetname of .xls files needs to be appended with a $. If the name of the sheet is Qlikview then the name of the table is Qlikview$.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks! It worked