Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
livio218526
Creator
Creator

Upload all filename in a path

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

1 Solution

Accepted Solutions
OmarBenSalem
Partner - Champion II
Partner - Champion II

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:

Capture.PNG

View solution in original post

1 Reply
OmarBenSalem
Partner - Champion II
Partner - Champion II

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:

Capture.PNG