StartEdit method is prefixing input with Single quote

Posted by: hghanta on 4 December 2017, 1:53 am EST

    • Post Options:
    • Link

    Posted 4 December 2017, 1:53 am EST

    When i am invoking StartEdit method by passing a formula its prefixing my input with a single quote. Can you please tell me in which possible cases it will do that ?

  • Posted 4 December 2017, 7:37 am EST

    Hello,

    I would suggest you to use the SetFormula() method to enter a formula in cell.

    Only users can type formula in cell starting with ‘=’

    Thanks,

    Deepak Sharma

  • Posted 4 December 2017, 8:36 am EST

    Thanks for your suggestion. But my requirement is take the user into edit mode & then show the input as part of it.

  • Posted 7 December 2017, 12:03 pm EST

    Hello,

    I have asked the development team to look into this issue. I will let you know as soon as I get an update on this issue.

    The tracking id for this issue is 251252

    Thanks,

    Deepak Sharma

  • Posted 15 December 2017, 4:23 am EST

    Hello,

    I have got an update about this issue from Developer. As I mentioned earlier setting the formula with Startedit method is not the right way. The startEdit method’s second parameter is only for cell text.

    Hence, when applying a formula, to make the formula be handled as a text, it will add quotePrefix to the formula.

    You can simply use the code like below:

    worksheet.setActiveCell(0, 2);
    worksheet.setFormula(0, 2, "=SUM(A1,B1)")
    worksheet.startEdit(false);
    

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels