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.
Tip to use date values when accessing data from excel spread sheet
Most of the SAHI Users are facing problem with conversion of date format. Though we have solution to do this by using custom function (Available in the forums). I have alternate method.
In the excel spread sheet where ever you have dates available insert '(signle quote) infornt of the date. convert the column properties as text.
Now you script reads this value as text (with out the ' (signle quote))
Declaration part:
var $originatingDt=($rs[$j]["originatingDt"]);
Data Setting:
_setValue(_textbox("originatingDt"), $rs[$j]["originatingDt"]);
This works for reading numbers also...
This worked perfectly fine.
Sunil Kumar Arumilli
In the excel spread sheet where ever you have dates available insert '(signle quote) infornt of the date. convert the column properties as text.
Now you script reads this value as text (with out the ' (signle quote))
Declaration part:
var $originatingDt=($rs[$j]["originatingDt"]);
Data Setting:
_setValue(_textbox("originatingDt"), $rs[$j]["originatingDt"]);
This works for reading numbers also...
This worked perfectly fine.
Sunil Kumar Arumilli
Comments
Regards,
Narayan
Regards,
Kiran
You can use _getDB() API to access data from an excel sheet.
To know more details about working with excel sheet check this :
http://sahi.co.in/w/working-with-excel-sheets
Regards
Sumitra