Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Extracting the source data file name

Hi!

I am loading some data from multiple Excel files using the following code:

for i = 0 to 20

CONCATENATE LOAD
[Type],
[Date],
[Country],

// XXXXXXX as [Source File Name]

FROM
[Data*.xls] (biff, embedded labels, table is data$);

next

I would need to set up the field ([Source File Name]) where I would be storing the name of the each source file for each record I am loading.

Any suggestions will be greatly appreciated.

Best regards,

Vladimir

1 Solution

Accepted Solutions
Not applicable
Author

See the use of filename() and filebasename() in the script.

Regards,

Gordon

View solution in original post

2 Replies
Not applicable
Author

See the use of filename() and filebasename() in the script.

Regards,

Gordon

Not applicable
Author

It works perfectly. Thank you!

Regards,

Vladimir