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.

Excel sheet problem, adding large data

ShwethaShwetha Members
edited November -1 in Sahi - Open Source
Hi,
I have a problem in adding large amount of data into excel sheet. I am able to write small sentences into the sheet. But if I have more than 2 sentences writing into excel sheet in my script, then only a part of the data is written into the file. Is there any solution for this or is it a limitation? Can anyone please help me.
Tagged:

Comments

  • narayannarayan Administrators
    Can you specify the strings you used, so that we can reproduce this?
  • ShwethaShwetha Members
    Hi,
    The data is just simple sentences with only alphabets and there are no special characters also in it. Also can you please tell me how to enter carriage return Alt+Enter into the cell in excel sheet through script. Because I am just writing the data in the single line itself. That may be the reason for the problem.

    Thanks and Regards
    Shwetha
  • Hi Narayan,
    i am also getting following error while trying to read excel data having ALT+Enter as cell content.
    JSERROR
    SyntaxError: unterminated string literal

    Do we have any work around to read multiline excel cell data?
  • narayannarayan Administrators
    Rashesh,

    Will have a look at this and get back to you.

    Regards,
    Narayan
  • VenkyVenky Members
    edited December 2009
    Hi Rashesh,

    Before, we make a permanent fix for this issue and just for time being, edit the lib.js file located at <sahi base directory>\htdocs\spr as below

    Replace the line
    var $evaled = eval('('+dbclient.select(this.driver, this.jdbcurl, this.username, this.password, sql)+')')['result'];
    

    as
     var $evaled = eval('('+dbclient.select(this.driver, this.jdbcurl, this.username, this.password, sql).replaceAll("\n", "\\\\n").replaceAll("\r", "")+')')['result'];
    

    Let us know, if this works for you.

    Thanks,
    Venky.
  • Spot on... Replace trick is working great. Thanks a lot Venky.
This discussion has been closed.