18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Guide me to work on excel with sahi
Hi,
Please guide me that what are the prerequisites to work on excel .
How to install jdbc .jar files and where to install .jar files
Please reply and thanking you in advance..
Regards
Raja
Please guide me that what are the prerequisites to work on excel .
How to install jdbc .jar files and where to install .jar files
Please reply and thanking you in advance..
Regards
Raja
Comments
These articles should answer all your queries:
http://sahi.co.in/w/adding-jars-to-sahis-classpath
http://sahi.co.in/w/working-with-excel-sheets
http://sahi.co.in/w/_getDB
Regards,
dkulkarni
When i run the script i am getting the below error:
ERROR [110 ms]
exception: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source) at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source) at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at net.sf.sahi.plugin.DBClient.getResult(DBClient.java:100) at net.sf.sahi.plugin.DBClient.select(DBClient.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247) at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3330) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175) at org.mozilla.javascript.Context.evaluateString(Context.java:1104) at net.sf.sahi.rhino.RhinoScriptRunner.run(RhinoScriptRunner.java:144) at java.lang.Thread.run(Unknown Source)
Note: I have placed "sqljdbc" & "sqljdbc4" executable jar files in ..\..\sahi_pro\extlib\db and i kept the class path like " SET SAHI_EXT_CLASS_PATH=..\..\extlib\db\sqljdbc4.jar".
OS: windows 7, 32 bit OS. 2007 excel..
Please reply..
Thanking you in advance...
Regards
Raja
Kindly check these URLs:
http://sahi.co.in/forums/viewtopic.php?id=1840
http://sahi.co.in/forums/viewtopic.php?id=2451
http://sahi.co.in/forums/viewtopic.php?id=3022
Check if this solves your issue.
Regards
Sumitra
I have configured as you suggestes even though we are facing the same issue.
Please reply..
Thanking you in advance...
Regards
Raja
var $db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls,*.xlsx, *.xlsm, *.xlsb)}; DBQ=C:\\Users\\xxxx\\sahi_pro\\userdata\\scripts\\Testdata.xls ;readOnly=false", "", "");
var $rs = $db.select("select * from [Sheet1$]");
_alert($rs[0]["username"]);
Regards
Raja