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.
Returns null while reading excel
Hi
I am reading excel using sahi opensource, but it is displaying null value (number formatted type).But i am able to get proper values for string formatted cells.
Below is my code
var $won = _getDB("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\\Invoice.xls;readOnly=false","","");
var $emp = $won.select("select * from [Summary$]")
for(var $i=0; $i<$emp.length; $i++){
_alert($emp)
// i am getting null value excel row col number datatype
_alert($emp[$i][0])
// getting null (if excel row col is number type )
// getting proper value (if excel row col is text type)
}
kindly help me on this
I am reading excel using sahi opensource, but it is displaying null value (number formatted type).But i am able to get proper values for string formatted cells.
Below is my code
var $won = _getDB("sun.jdbc.odbc.JdbcOdbcDriver","jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=C:\\Invoice.xls;readOnly=false","","");
var $emp = $won.select("select * from [Summary$]")
for(var $i=0; $i<$emp.length; $i++){
_alert($emp)
// i am getting null value excel row col number datatype
_alert($emp[$i][0])
// getting null (if excel row col is number type )
// getting proper value (if excel row col is text type)
}
kindly help me on this
Answers
I have encountered the similar question with you.I tried to read Excel files with this Excel reader in Sahi:
http://www.rasteredge.com/how-to/csharp-imaging/excel-reading/
But it can not work effective.Is there any good recommendation which supports to work with Sahi ?Or does Sahi supports to do that?
Thanks a lot.
I have been using JexcelAPI to read data from Excel file and I haven't have any problems with it.