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: 
bwisealiahmad
Partner - Specialist
Partner - Specialist

Load all Excel Files from folderin Qlik Sense

Hi,

I was wondering if someone could share an example of loading all excel files in a folder done in Qlik Sense without putting it into legacy mode? I've seen some QV examples using an ODBC connector style of doing it, but wanted to see if anyone has an easier / better way to do it around.


Best,

Ali A

12 Replies
bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

I'm thinking more of the ODBC connecting to an Excel sheet part

bwisealiahmad
Partner - Specialist
Partner - Specialist
Author

Ended up doing someting similar which I found here: http://help.qlik.com/en-US/sense/June2017/Subsystems/Hub/Content/Scripting/ScriptControlStatements/F...

Here is the example I ended up with:

sub GetAllExcelSheets (Root)

   for each Ext in 'xlsx'

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

     

Table:

LOAD

*

FROM ['$(File)'](ooxml, embedded labels, header is 2 lines); // specific header according to my example, could be different for yours.

      next File

   next Ext

// for each Dir in dirlist (Root&'\*' )

//       call DoDir (Dir)

//    next Dir

end sub

call GetAllExcelSheets ('lib://(LibName)')

Jayasharma89
Contributor
Contributor

Hi can you explain what is Root in the example

sub GetAllExcelSheets (Root)

 

Thanks

Jaya Sharma