Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
i am fetching data from different XL Sheets (like Sales,product,XXX,YYY ) into the qlikview .Now the issues is i want to know the file name from which data is coming in the UI ..Please give any ideas..
Add a string with the sheetname as a new field SheetName:
MyData:
LOAD *, filename() as FileName, 'Sheet1' as SheetName
FROM C:\MyExcelFile.xls
(biff, embedded labels, table is Sheet1$);
But perhaps you're looking for something like this: Loading from multiple Excel files and multiple sheets. In that piece of code you can use the variable vFile and zSheet:
LOAD *, '$(vFile)' as FileName, '$(zSheet)' as SheetName
FROM [$(vFile)] (ooxml, no labels, table is [$(zSheet)]);
Basically use the filename() function:
Load *, filename() as Filename
from ...
See the File Functions section in the help file for more details and other useful file functions.
Sorry i forget 1 point .In a same XL sheet i have different tabs.So can we get from which tab it was coming..
Add a string with the sheetname as a new field SheetName:
MyData:
LOAD *, filename() as FileName, 'Sheet1' as SheetName
FROM C:\MyExcelFile.xls
(biff, embedded labels, table is Sheet1$);
But perhaps you're looking for something like this: Loading from multiple Excel files and multiple sheets. In that piece of code you can use the variable vFile and zSheet:
LOAD *, '$(vFile)' as FileName, '$(zSheet)' as SheetName
FROM [$(vFile)] (ooxml, no labels, table is [$(zSheet)]);
Thank you ,
But if i have more sheet ,like consider 50 sheets ,Is there is any solution.