18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Exception when I try to connect to an excel file

sgerardsgerard Members
edited December 2013 in Sahi - Open Source
Hello,

I have the following script:
var $excelFilePath = "C:\temp\myExcelFile.xlsx";
var $excelFile= _getDB( "sun.jdbc.odbc.JdbcOdbcDriver",
"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)}; DBQ=<b>"+$excelFilePath+"</b>;readOnly=false",
"",
"");

and when I launch it, I have the following exception:

[Microsoft][ODBC Excel Driver]General error Unable to open registry key
'Temporary (volatile) Ace DSN for process 0x2b9c Thread 0x29d4 DBC 0xa5d8008 Excel '.

I am using
OS : Win 7 x64,
MS Office : 2010 x64,
Java : 1.6.0_34 x64

Does someone faced that issue and resolved it?

many thanks,

Regards

Stéphanie

Answers

  • Hi Stephanie,
    Can you please try adding an extra "\" in the path of the excel file?

    Please try changing :
    var $excelFilePath = "C:\temp\myExcelFile.xlsx";
    
    to:
    var $excelFilePath = "C:\\temp\\myExcelFile.xlsx";
    

    Regards,
    Pratyush
Sign In or Register to comment.