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.

Can i enter data into an excel column without the need of 'where'?

hishamnhishamn Members
edited November -1 in Sahi - Open Source
Can i enter data into an excel column without the need of 'where'?
i just want to append steps to a particular column.

Comments

  • Hi Hishamn,

    Find the below code which would help you -

    var $SheetName = CurrentTimeDate();
    $SheetName = "Result_" + $SheetName;

    $db = _getDB("sun.jdbc.odbc.JdbcOdbcDriver", "jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=C:\\sahi\\userdata\\scripts\\Results.xls;readOnly=false","","");
    $db.update("insert into [SheetName$] (ExecutionResult) values('"+ $SheetName + "')");//// this will insert your particular sheet, this will amend your sheet
    $db.update("update [SheetName$] set Result='Passed' where ExecutionResult='TC01'"); //// this will update your particular sheet

    Let me know if you still find any difficulties.

    -Ashish
Sign In or Register to comment.