Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
diptojyotidutta
Contributor II
Contributor II

Check weather a particular sheet is present or not, and if not then load the other sheets

hello everyone,

 

I have some no.of excel files in a folder.

Now, all the excel files have same no.of sheets except one. That one excel file has 2 sheets extra. Now whenever i try to load the data it gives an error saying that "Field 1 not found".

 

What must be the solution for this so that my app loads all the files regardless of the no of sheets in an excel file.

 

Regards,

Dipto

2 Replies
Gysbert_Wassenaar

If you want to dynamically load sheets from an excel file (or several) you need to use an ODBC connection to connect to the excel file and use the odbc SQLTABLES function to get a list of tables from the excel file. That list of tables will include the sheets. You can then use that list of tables to iterate over the sheets and load the data. You can find an example here: https://community.qlik.com/t5/QlikView-App-Development/Loading-Multiple-Excel-Files-and-their-sheets...


talk is cheap, supply exceeds demand
diptojyotidutta
Contributor II
Contributor II
Author

Thanks for your suggestion but the problem here is that I cannot make any separate ODBC connection here as in this project the data is being extracted directly from the folder and I am not supposed to change it. So now what must be the solution?