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.

How we can use .xls file as a input file.

AkhilsAkhils Members
edited November -1 in Sahi - Open Source
Till now i have used .txt files as a input file and its working fine.
Script I used:

var $fileContents = "" + _readFile("D:\\Testdata\\test.txt");
var $SEPARATOR = ","; // or "\t" for tab
var $data = new Array();
var $lines = $fileContents.replace(/\r/g, '').split("\n");
for (var $i=0; $i<$lines.length; $i++)
{
$data[$i] = $lines[$i].split($SEPARATOR);
$row = $data[$i];
_setValue(_textbox("factoryInfo.name"), $row[0]);
}

What I need to change in script for using excel file instead of text.

Comments

Sign In or Register to comment.