Ctr+v is not working for first time in spreadjs sheet

Posted by: varad9525 on 6 February 2018, 5:42 am EST

    • Post Options:
    • Link

    Posted 6 February 2018, 5:42 am EST

    Hi,

    I want to set focus,cursor to the first cell in the spreadJs sheet.I tried below code :

    activeSheet.setActiveCell(0, 0);

    activeSheet.startEdit();

    By using above code the focus is set to the first cell of the sheet and first cell converted to edit mode.Due to which all the table data is pasted in the first cell only.Want to focus on the first cell only.

    when i am pasting 3-4 line text it is copying only in first cell .

    Thanks,

    Varad

  • Posted 7 February 2018, 3:21 am EST

    Hello Varad,

    You should call the StartEdit() method if you do not want to edit the particular cell. You only need to set the Active cell using setActiveCell() method before pasting data. It will start the paste data from first cell i.e. cell(0,0).

    Thanks,

    Deepak Sharma

  • Posted 7 February 2018, 3:35 am EST

    Hi deepak,

    suppose i copy

    1)hi

    2)hello

    3)how are you

    suppose im pasting these three line on newly created spread js sheet

    with this code

    activeSheet.setActiveCell(0, 0);
    activeSheet.startEdit(); 
    

    its pasting like

    1)hi 2)hello 3)how are you

    i want its pasting like

    1)hi

    2)hello

    3)how are you

  • Posted 8 February 2018, 3:30 am EST

    Hello,

    If you can call startEdit() method after setting the active cell, that cell gets into edit mode and all the text will be pasted in that one cell. You should not call the startEdit() method.

    Paste right after setting the cell as Active:

    activeSheet.setActiveCell(0, 0);

    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