Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
lars_plenge
Partner - Contributor III
Partner - Contributor III

Qlik Sense, Loop excel sheets names.

Hi

I need to get the sheets name out of a lot of excel files. It is working in qlikview but not in Qlik Sense:

QlikView Solution:

sub DoDir (Root)

  for each Ext in 'xls' , 'xlsx', 'xlsm'

      for each File in filelist (Root&'*.' &Ext)     

     ODBC CONNECT32 To [Excel Files;DBQ=$(File)];

     Sheets:

     SQLTABLES;

     DISCONNECT;

next File

next Ext

end sub

Call DoDir('C:\Qliksense\TOCs\Lars\') ;

//sense Call DoDir('lib://TOCs/') ; where lib is C:\Qliksense\TOCs\Lars

EXIT Script;

5 Replies
lars_plenge
Partner - Contributor III
Partner - Contributor III
Author

Hi Sonny

The loop is working, it is the "  ODBC CONNECT32 To [Excel Files;DBQ=$(File)]; " that does not sesam to work.

Regards

Lars

sunny_talwar

You have different ODBC for different files?

lars_plenge
Partner - Contributor III
Partner - Contributor III
Author

There is a build-in OBDC driver in Qlik Sense but it seams that it can not be called like in QlikView.

sunny_talwar

May be, I have not tried this in QlikView of Qlik Sense, may be some one else might be able to offer better help