Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jpapador
Partner - Specialist
Partner - Specialist

Filelist check for just xls and exlude xlsx

I have written a loop that checks a directory for xls files:

FOR EACH File in FileList('\\SharedDrive\Production\Qlikview\Rebate Data\*.xls')

LET  vXLSExists = 1;

exit for when $(vXLSExists) = 1;

NEXT File;

Works great.  The problem is there are NO .xls files in that directory.  There are a bunch of .xlsx files.  I know the QlikView help says that .xls in a filelist is essentially .xls*.

Is there anyway to change it to only search for .xls?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Strange, I never noticed that NOTE in the HELP before.

Try maybe something like

LET  vXLSExists = If(Subfield('$(File)','.',-1)='xls',1,0);

View solution in original post

2 Replies
swuehl
MVP
MVP

Strange, I never noticed that NOTE in the HELP before.

Try maybe something like

LET  vXLSExists = If(Subfield('$(File)','.',-1)='xls',1,0);

jpapador
Partner - Specialist
Partner - Specialist
Author

Thank you, that works