Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
can any one explain how to load multiple excel files in single script ? take one scenario .
Hi
try this
for Each vMonth in 'Jan','Feb','Mar','Apr','May','Jun'
Data:
LOAD ID,
State,
'$(vMonth)' as Month,
Sales
FROM
SALES_M.xlsx
(ooxml, embedded labels, table is $(vMonth));
NEXT vMonth
here:
in your xl sheet names like jan ,feb,mar ......
change the names based on ur sheets
Hi,
If all the files are of the same format ie., same columns then try like this using wildcard characters.
Data:
LOAD
*,
FileName() AS SourceFile
FROM
*.xlsx
(ooxml, embedded labels, table is Sheet1);
Hope this helps you.
Regards,
Jagan.
Hey,
you may try this to load files from a same folder with similar structure:
For each file in FileList('C:\Users\chinna\Documents\QlikView\*')
TEMP_FILE:
LOAD
*,
subfield('$(file)','\',-1) as filename,
FileTime('$(file)') as Date_file autogenerate 1;
Next;
BR,
Chinna