Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wildcard filename logging

If I use a wildcard in my load statement, it doesn't seem that the logfile is including the actual filenames that are opened. the logfile simply repeats the wildcard pattern in each load statement. Is there a way to get the actual filenames logged? Is this a known issue, or am i just missing something? Thanks!

3 Replies
Anonymous
Not applicable
Author

In the load statement you add the file name like this onto every table row it loads from that file.


     filename() as FileName


Not really what you are after but I have found it useful on occasion.

Not applicable
Author

Thanks Bill. It's not exactly what I was looking for, but... it's a pretty useful idea for this and other situations! Thanks!

Anonymous
Not applicable
Author

Have a look at this blog post


http://community.qlik.com/blogs/qlikviewdesignblog/2013/01/10/wildcard-data-loading-blah

To the script below you could add the Trace function to display variable to the screen & log.

For each vFile in FileList('C:\Users\aby\Desktop\*wildcard.xlsx')

Load Col2+Col3 as Total,
     *;
Load *,
     Filebasename() as Source

from [$(vFile)]
(ooxml, embedded labels, table is Sheet1);

Next vFile