Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi expert, i would like to know if there are any way to load information in qlikview from excel that contain several sheet, do it automaticaly not load each sheet in the script
i attached and example from excel with 3 different sheets and a qvw that load each sheet from one on a time.
thank you a lot
Fernando
Hi Fernando,
See the link below:
Loading data from all the tabs of an excel
Solution by Anand Chouchan:
For Each vFile in FileList('MulitpleDataExcel.xlsx')
ODBC CONNECT32 To [Excel Files;DBQ=$(vFile)];
Sheets:
SQLTABLES;
DISCONNECT;
For i = 0 To NoOfRows('Sheets')-1
Let vSheet = left(Peek('TABLE_NAME', i, 'Sheets'), len(Peek('TABLE_NAME', i, 'Sheets'))-1);
LOAD '$(vSheet)' as [Tab Name], *
From [$(vFile)]
(ooxml, embedded labels, table is $(vSheet));
Next;
Next;
Best Regards,
François
See this example:
for loop =1 to 3
LOAD
A,
B,
C
FROM
t1.xls
(biff, embedded labels, Table is [Sheet$(loop)$]);
NEXT;
Thank you SwathiRaj WORKS OK!
Fernando