Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
GanCW
Contributor
Contributor

How to display the name of file being loaded

I have a code that load excel file using wildcard

LOAD

....

FROM [lib://Payment Data/Payment Data *.xlsx]

How can I display the name of the file being loaded in the log file using TRACE commend ?

GanCW_0-1618976777314.png

 

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

I don't think you can fetch the name to be displayed by trace command when using the wildschar method .

An alternative is to loop your files like below. It will five you more freedom to perform controls or display traces between each file iteration.

For each _file in FileValueList('lib://Payment Data/Payment Data *.xlsx')

Trace $(_file);

Load ... From [$(_file)];

Next _file

View solution in original post

4 Replies
Vegar
MVP
MVP

I don't think you can fetch the name to be displayed by trace command when using the wildschar method .

An alternative is to loop your files like below. It will five you more freedom to perform controls or display traces between each file iteration.

For each _file in FileValueList('lib://Payment Data/Payment Data *.xlsx')

Trace $(_file);

Load ... From [$(_file)];

Next _file

Dalton_Ruer
Support
Support

Workaround is save the FileName() value into a field in your table, Peek at it, then remove it after you are done reading the files.

Dalton_Ruer_0-1619029110944.png

 

GanCW
Contributor
Contributor
Author

Thanks for the suggestion.

GanCW
Contributor
Contributor
Author

Thanks for suggesting another way of doing this !