Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Check if excel file exist

Hello qlikers 🙂 ,

I want to check if an excel file exist or not.

LET vExistQVD=isnull(QvdCreateTime('Test/File.qvd'));    //works
LET vExistFile = isNull('Test/File.xls');                //works not

The script snippet for check if the qvd exist works, but not the other code snippet.

How can I check if there file exist or not ? Thank you in advance! 

Labels (1)
1 Solution

Accepted Solutions
Rodj
Partner - Creator III
Partner - Creator III

Try:

if IsNull(filesize('[lib://Yourdata/YourFile]')) = -1 then

  SET vExistFile ='false';
else   
  SET vExistFile='true';
endif;
 
That's how it's done in the Qlik Deployment Framework and worked for me just now in a quick test in desktop.

View solution in original post

1 Reply
Rodj
Partner - Creator III
Partner - Creator III

Try:

if IsNull(filesize('[lib://Yourdata/YourFile]')) = -1 then

  SET vExistFile ='false';
else   
  SET vExistFile='true';
endif;
 
That's how it's done in the Qlik Deployment Framework and worked for me just now in a quick test in desktop.