Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Experts,
I am having one main folder called "Folder". In this folder i have some files
Jan.xlsx,
Feb.xlsx,
Mar.xlsx
...........
now i want load all excel files dynamically in single statement from mail "folder"
Thanks in advance
See this blog post: Loops in the Script
try this
FOR each vFile in filelist('$(vSourceLocation)/*.xlsx')
LOAD
A,
B,
C
FROM
[$(vFile)];
NEXT
Alternative would be to use a wildcard in the filename in your load script:
Data:
LOAD
*
FROM
[directory\*.xlsx]
Just make sure tabs on all files are named the same way... e.g. (ooxml, embedded labels, table is Sheet1)
Check this thread