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.

Create Excel file using Sahi

SuparnaSuparna Members
edited November -1 in Sahi - Open Source
Hi narayan,

1)is it possible to create Excel file using sahi?
I want to create a excel file and change color of cells during run time.
please provide solution 4 this.

i did work around by calling javascript file but its not working.
2)how to call a javascript function in sahi script?

Comments

  • narayannarayan Administrators
    Sahi cannot create Excel File by itself. You will need to use Java and some excel libraries to do this. You may want to ask your developer to help you with this.

    You can just directly call a javascript function.

    function abc(){ // definition
    }

    abc(); //call

    Is that what you are looking for?
  • SuparnaSuparna Members
    Yes narayan,
    i tried this, i have written 1 function in JS file and included js file in my sahi script using _include("filename.js");
    and i m calling function
    Call executeExcel();

    but its not working.
  • SuparnaSuparna Members
    did i need to wrap javascript function <browser> tag?
  • narayannarayan Administrators
    Call executeExcel(); //wrong
    or just
    executeExcel(); //right
  • SuparnaSuparna Members
    when i call js function in my sahi script i m Getting error as"ActiveXobject" is not defined.

    but when i execute js file it is creating excel.
Sign In or Register to comment.