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: 
Chinmay-005
Contributor
Contributor

ODBC connection error for uploading excel file

Hi Team,

I am trying to upload excel file but getting below error.

SQL##f - SqlState: IM002, ErrorCode: 0, ErrorMsg: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

 

My operating system is 64 bit 

 

Currently I am using below code:-

Let vDir = '$(vPathCSP)' & '*.xlsx';
FOR Each file in FileList(vDir)
ODBC CONNECT32 TO [MS Excel;DBQ=$(file)];
tables:
SQLtables;
DISCONNECT;
NEXT

FOR i = 0 to NoOfRows('tables')-1
LET sheetName = purgeChar(purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39)), chr(36));
LET file_path = purgeChar(purgeChar(peek('TABLE_CAT', i, 'tables'), chr(39)), chr(36));
IF sheetName='Sheet1' THEN
Employees:
LOAD Distinct //Added distinct since the belgium dummy data is not unique, it is made from the training data
'1' AS IND_EMPLOYEE_DATA,
[Pers.nr.] AS EMPLOYEE_ID,
// ID is required for export functionality
[Pers.nr.] AS ID,
[Practice] AS PRACTICE_CODE,
//[EG],
[Aanspreeknaam] AS EMPLOYEE_NAME,
[Emailadres] as Emailadres
FROM $(file_path) (ooxml, embedded labels, table is [$(sheetName)]) where IsNum([Pers.nr.]) AND [EG] = 'CSS-P' AND
match([Practice],'B19','B50','B51','B60','B61','B70','B71','B42') > 0; //Added the BE Gxx practices

// FROM $(file_path) (ooxml, embedded labels, table is [$(sheetName)]) where IsNum([Pers.nr.]) AND [EG] = 'CSS-P' AND
// match([Practice],'B19','B50','B51','B60','B61','B70','B71') > 0; //Added the BE Gxx practices
ENDIF
NEXT

 

Regards,

Chinmay Utekar

Labels (1)
  • Other

1 Solution

Accepted Solutions
Lucas_Gatling
Support
Support

@Chinmay-005  take a look a few of these links on how to install Excel ODBC driver:

https://answers.microsoft.com/en-us/msoffice/forum/all/installation-of-excel-driver-for-odbc-64-bit/...

https://www.cdata.com/drivers/excel/odbc/

 

If the issue is solved please mark the answer with Accept as Solution.

View solution in original post

3 Replies
Lucas_Gatling
Support
Support

@Chinmay-005  Do you have an Excel ODBC driver installed on machine you are attempting to connect to? Can you try using 'Table File' open to upload the Excel in lieu of an ODBC connection?

If the issue is solved please mark the answer with Accept as Solution.
Chinmay-005
Contributor
Contributor
Author

@Lucas_Gatling  could you please help to how to install ODBC driver, which DLL is required and how to register it on 64 bit machine??

Lucas_Gatling
Support
Support

@Chinmay-005  take a look a few of these links on how to install Excel ODBC driver:

https://answers.microsoft.com/en-us/msoffice/forum/all/installation-of-excel-driver-for-odbc-64-bit/...

https://www.cdata.com/drivers/excel/odbc/

 

If the issue is solved please mark the answer with Accept as Solution.