Sync clipboard copy/paste with SpreadJS context menu

Posted by: kim.dok on 29 March 2023, 10:08 am EST

    • Post Options:
    • Link

    Posted 29 March 2023, 10:08 am EST

    Hi,

    There is an issue when trying to copy/paste from Excel into SpreadJS,

    it doesn’t seem to work with the SpreadJS context menu.

    The following options seem to be working as expected:

    • Ctrl + c or copy from the Excel’s context menu → Ctrl + v to SpreadJS
    • Ctrl + c from SpreadJS → Ctrl + v or paste from the Excel’s context menu

    However when trying to combine SpreadJS context menu actions it doesn’t work, for example:

    • Ctrl + c or copy from the Excel’s context menu → paste by SpreadJS context menu
    • copy by SpreadJS context menu → Ctrl + v or paste from the Excel’s context menu

    We saw that in different applications such as Google sheets it works.

    Is this a bug?

    Thanks.

  • Posted 30 March 2023, 11:53 pm EST

    Hello,

    When a value is copied using the context menu of SpreadJS, the value is stored in the internal clipboard of SpreadJS. This value is not available in the external clipboard(browser provided). Similarly, when the paste option of the context menu is used, the value is pasted from the internal clipboard of the SpreadJS and not from the external clipboard.

    This is why, when you copy the value from excel and paste into spreadjs using the context menu paste option, the value is not pasted because the internal clipboard of spreadjs does not have that value. In the same way, when you copy value using context menu copy option of spreads, the copied value is stored only in the internal clipboard and not in the external clipboard. That is why excel can not paste those values.

    Please note that this is by design. There was a technical limitation of limited access to the external clipboard’s(browser-provided) due to security concerns. Web apps can not directly read or modify the clipboard data until the user explicitly press ctrl+c/ctrl+v keys. Clipboard API provides the API to manipulate the clipboard but it is currently not supported in spreadJS.

    Regards,

    Avinash

Need extra support?

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

Learn More

Forum Channels