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: 
Not applicable

Get the worksheet names in an Excel Workbook

In Qlik View, I can use ODBC to get a list of worksheet names inside an Excel workbook using this script

ODBC CONNECT32 TO [Excel Files; DBQ=$(vFileName)];
WorksheetNames:
SQLtables;
DISCONNECT;

I try to do the same in Qlik Sense but it does not work, how can I get a list of worksheet names in Qlik Sense?

Thanks,
Matthew

2 Replies
JonnyPoole
Employee
Employee

Most of the script is still value but the connection strings are different in Qlik Sense

In the below example, i first had to create an ODBC data source called 'Excel' which points to a fixed excel document.

Then i created a connection in Sense and added that connection to the script followed by the other script commands.

Will this work ?  Its not dynamic and you can't pass an excel file name to it as a variable...

Capture.PNG.png

Not applicable
Author

Thanks Jonathan.  Hardcoding of the Excel DSN is not an option for me.  I need to loop through the Excel files in a directory and then import selected worksheets in the workbook.