Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Unable to insert decimal integer values

devdev Members
I am inserting some excel value into the application
Details as follow,
Excel sheet “From” column value is “0.2”
(Column format as text and add “ ‘ “ in front of the “0.2”.)

But it’s inserting value “2” into the application text fields.

What is the reason for that, how do I insert “0.2” instead of “2”?


  • Hi Dev,

    I am not sure what you are exactly looking for, but try below code it works fine with me -

    $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('0.5')");
    $db.update("update [SheetName$] set Result='0.2' where ExecutionResult='TC01'");

    Let me know if there is still issue.
  • I am facing the same. I tried to insert decimal number from array into the application textbox. Using the following code:

    var my_array = new Array();
    my_array[0] = "10";
    my_array[1] = "2.20";
    my_array[2] = 35;
    my_array[3] = 42;
    my_array[4] = 50;
    my_array[5] = 60;
    my_array[6] = "2.25";
    my_array[7] = "1.85";
    my_array[8] = "5.70";

    updateMarks(my_array);//Call function to provide inputs by array
    _click(_span("Revathi V"));//Change User Name
    function updateMarks($AddMarks){
    var $textboxes = _collect("_numberbox", "/.*/", _in(_div("marks_content")));
    for (var $i=0; $i<$textboxes.length; $i++) {
    // alert($textboxes[$i]);
    _setValue($textboxes[$i], $AddMarks[$i]);

Sign In or Register to comment.