Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I need to load all file name in a Path that I have set like a variable.
I try to use this code, but it doesn't fix:
SET vPath = 'lib://FilePath/';
Directory;
LOAD
*,
filebasename( ) as x
FROM
[$(vPath)]
(biff, embedded labels, table is Sheet1$);
Where Lib is the connection name.
Thanks
in this folder, you have many excel files for example, and you want to import the full name of each file?
Try as follow: (adapt it tu ur script)
Data :
load 0 as field AutoGenerate(0);
For Each vPath in FileList('lib://Test/*.xlsx')
Concatenate
Load
'$(vPath)' as name
FROM [$(vPath)]
(ooxml, embedded labels, table is Sheet1);
Next vPath
Drop Field field From Data;
Result:
in this folder, you have many excel files for example, and you want to import the full name of each file?
Try as follow: (adapt it tu ur script)
Data :
load 0 as field AutoGenerate(0);
For Each vPath in FileList('lib://Test/*.xlsx')
Concatenate
Load
'$(vPath)' as name
FROM [$(vPath)]
(ooxml, embedded labels, table is Sheet1);
Next vPath
Drop Field field From Data;
Result: