Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to add the filenames from a folder into a table so i can loop through them to pull the data from them.
I have searched through a number of posts but none seem to work.
Any suggestions?
The folder is called "Jedox_Data"
I would expect it to be something like the below
for each file in filelist('lib://Jedox_Data/*.xlsm')
Filelist:
load
'$(file)' as Filename;
next file
May be like this?
sub DoDir (Root)
for each Ext in 'xlsm'
for each File in filelist (Root&'\*.' &Ext)
LOAD
'$(File)' as FileName
autogenerate 1;
next File
next Ext
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
next Dir
end sub
call DoDir ('lib://Jedox_Data') // Here, I assume that "Jedox_Data" is the connection name of that folder path
May be like this?
sub DoDir (Root)
for each Ext in 'xlsm'
for each File in filelist (Root&'\*.' &Ext)
LOAD
'$(File)' as FileName
autogenerate 1;
next File
next Ext
for each Dir in dirlist (Root&'\*' )
call DoDir (Dir)
next Dir
end sub
call DoDir ('lib://Jedox_Data') // Here, I assume that "Jedox_Data" is the connection name of that folder path