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

How to control Excel File Load

Dear Friends,

I have to read a lot of excel files, but this load have a particularity. Each excel file may have or not a sheet called "USD". So If this file have this sheet  I have to read all the data, and if not I have to pass to the other one and do the same process until complete all the files. I know how to process multiple files but I don't Know how to control the script execution using a control for the Sheet name.

Please give me and idea with that !!

Best Regards!

Carlos

1 Reply
passionate
Specialist
Specialist

Hi Carlos,

Add below script:

SET ErrorMode=0;// this will ignore error if excel workbook has no USD sheet

for each vFileName in FileList('D:\Pactise\Community\New folder\*.xlsx');

LOAD *

FROM

$(vFileName)

(ooxml, embedded labels, table is USD);

next


Please let me know if this not working.


Regards,

Pankaj