Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi !
I am using the filelist() function along with a "for each" in order to load several CSV files. I am using QV 11.20.
This particular piece of code :
For each vFile in FileList('.\*.csv')
trace file : $(vFile);
sleep 2000;
Next vFile
leads to load *.csv file which is the expected behavior, but it also loads *.csv*. It means it loads also *.csv_old for example.
I tried also with xlsx files, but it behaves correctly in that case. This seems specific to CSV files.
Is there any mean to disable this strange behavior ?
Thanks,
Laurent
It looks like a bug .... You could as workaround check the extension directly or the len(extension) in an additionally step like:
if subfield('$(vFile)', '.', -1) = 'csv' then
...
end if
- Marcus
Thanks Marcus.
Actually, we used a similar code to bypass this bug :
if('$(vFile)' like '*.csv') then
...
end if
Laurent
Hi Laurent,
this is a bug, reports to Qlikview.
Thanks for your note.
Luca Jonathan Panetta
Yes. It's a bug.
Test the filename extension individually inside loop.
Caria