Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prabhas277
Creator
Creator

Load all files dynamically from folder

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

5 Replies
Gysbert_Wassenaar

See this blog post: Loops in the Script


talk is cheap, supply exceeds demand
dsharmaqv
Creator III
Creator III

try this

FOR each vFile in filelist('$(vSourceLocation)/*.xlsx')

LOAD
A,
B,
C

FROM
[$(vFile)];

NEXT

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Alternative would be to use a wildcard in the filename in your load script:

Data:

LOAD

    *

FROM

[directory\*.xlsx]

albertovarela
Partner - Specialist
Partner - Specialist

Just make sure tabs on all files are named the same way... e.g. (ooxml, embedded labels, table is Sheet1)

avinashelite