Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I want to load all files within a folder (in which has sub folders, which I DON'T want to load).
At the moment I'm using [pathname\*.xls] which reads XLS files, but I ALSO want to load in xlsX files.
Is there a way to do this?
Thanks!
Try This
LET PathName = '..\..\MyDirectory\*.xls?';
Hi,
and if you may have there xlsY, which maybe you dont like to load, you may try something presented in help:
SUB DoDir (Root)
FOR Each Ext in 'qvw', 'qva', 'qvo', 'qvs'
FOR Each File in filelist (Root&' \*.' &Ext)
LOAD
'$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime
autogenerate 1;
NEXT File
NEXT Ext
FOR Each Dir in dirlist (Root&' \*' )
call DoDir (Dir)
NEXT Dir
ENDSUB
CALL DoDir ('C:')
You need to load these files separately since the load structure is different for xls and xlsx.
Like :
TempXls:
pathname\*.xls]
TempXlsx:
pathname\*.xlsx]
And then do a concatenate.