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.
Create Excel file
Hi,
I have written code to create Excel in JavaScript file .When I call java script function , am getting error “"ActiveXobject" is not defined”.
Please provide solution for this.
I have written code to create Excel in JavaScript file .When I call java script function , am getting error “"ActiveXobject" is not defined”.
Please provide solution for this.
Comments
The function CreateExcel written in Java file using HSSF.
1) how can i call this function in my sahi Script.
or
I need to write Java code in sahi file? if so then how to use HSSFworkbook, workbook.create and how to change cell color.
IF any one knows solution please help me.
Find out what the package name of your class is, then you can call it like this:
Packages.com.mypackage.CreateExcel()
Have a look at these links for more details:
http://sahi.co.in/w/sahi-scripting-calling-java
http://www.mozilla.org/rhino/ScriptingJava.html
Regards,
Narayan