Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load multiple excel file in Qlik Sense

Hi,

Is it possible to load multiple excel files in Qlik Sense with different file names but same sheet name and field name?

Thanks

6 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Yes you can use the qlikview script given in below link, it will work in Qlik Sense.

Load multiple excel files from Multiple excel sheetsinto QV

Loading Multiple Excel Sheets Dynamically along with file name and sheet name

Regards

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks for the reply, I had tried it before but it does not load anything. I am trying to Disabling standard mode so that it can run in legacy mode, however when I open the setting.ini, it is a blank page.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

In Qlik Sense you might need to modify the script little bit, due to the way the Path is defined in Qlik Sense.

Hope you have done that change. (Create a Library path which is connected to the folder from where you want to get the excel)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

I have change to file path to lib connector, but I don't know how to change to ODBC CONNECT32, it saids "connects other than lib connect are not available in this script mode"

//to read each file from the specified folder

FOR EACH file in FileList('Lib://Transport Claim/*.xls');

//In order to get the file information from SQLtables command making use of the ODBC connection format

ODBC CONNECT32 TO [Excel Files;DBQ=$(file)];

tables:

SQLtables;

DISCONNECT;

FOR i = 0 to NoOfRows('tables')-1

LET sheetName = purgeChar(purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39)), chr(36));

Table:

Load * ,

FileBaseName()as FIle,

FileDir() as Dir,

FileName() as File_Name,

'$(sheetName)' as Sheet_name

From $(file)(ooxml, embedded labels, table is [$(sheetName)]);

NEXT i

Next

jayaseelan
Creator III
Creator III

Hi,

Try this Example to you case,

FOR EACH file in FileList('C:\Users\HP\Desktop\New folder\2700.xlsx');

ODBC CONNECT32 TO [Excel Files;DBQ=$(file)];Temp:

SQLtables;

DISCONNECT;

FOR i = 0 to NoOfRows('Temp')-1

LET sheetName = purgeChar(purgeChar(peek('TABLE_NAME', i, 'Temp'), chr(39)), chr(36));

Table:

Load * ,

FileBaseName()as FIle,

FileDir() as Dir,

FileName() as File_Name,

'$(sheetName)' as Sheet_name

From $(file)(ooxml, embedded labels, table is [$(sheetName)]);

NEXT i

Next

Thank,

nizamsha
Specialist II
Specialist II

Hi Kaushik Solanki

 

How to change according to Qlik Sense Script I tried many ways but it does not work

 

 

Regards

Nizam