Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
how can i loop through a directory and load all XLS files stored in this directory ?
I would like to do this in my LOAD script.
Folder structure is like this:
- FOLDER
- XLS1
- XLS2
- XLS3
(...)
Thanks for some advise.
Regards,
K
Define another path and use it with or condition when you define the condition of the for
let path_Alles = '..\..\myfile_*.xlsx';
for each File in filelist (path_Alles)
PalletInfo:
LOAD
*
FROM $(File) (ooxml, embedded labels, table is Display)
Where condition
next File
I hope this helps
FOR i = 1 to (count XLS file)
LET LoadPath = '(path)\XLS_$(i)&'.xls';
If FileSize('$(LoadPath)') > 0 then
[t1]:
LOAD *
FROM
$(LoadPath)
(ooxml, embedded labels, table is Sheet1)
;
ENDIF
NEXT
OK, thanks. And how woulg this work if i have an additional layer of folders ?
Like this:
- ROOTFOLDER
- FOLDER1
- XLS1
- XLS2
- FOLDER2
- XLS1
- FOLDER3
- XLS1
- XLS2
Thanks very much!
Define another path and use it with or condition when you define the condition of the for
Can this be done in incremental load way. Mean, if I have already loaded the excel files it should not load again when I re-run this qvw again in future?