Issue with Copy and paste from a cell with formula

Posted by: wmeng on 27 May 2022, 4:06 pm EST

  • Posted 27 May 2022, 4:06 pm EST

    Description:

    When user paste formula using keyboard shortcut formula selection

    deselected after paste action.

    Conditions:

    • IMPORTANT: Use Paste with shortcut CTRL+V. If programmatically paste, it works as expected.
    • The formula’s referenced cell value changes after Paste.

    Steps:

    • A1 cell has a random value. It will be updated after each paste event (could be any event).
    • A2 cell has a formula ‘=A1+10’
    • Copy the cell A2 (CTRL+C)
    • Paste it using CTRL+V anywhere → Pastes Formula (Correct)
    • Paste it using CTRL+V anywhere → Pastes Value (Incorrect)

    This happens because after first paste, copy selection is gone.

    Expected:

    Paste action should paste the formula into the target cells

    Actual:

    After first paste, will paste only value not formula.spreadjs_copypasteformula.zip

  • Posted 30 May 2022, 1:36 am EST

    Hi,

    Thanks for the sample. This is expected, actually, you changed the sheet inside the clipboard Pasted event(sheet.setValue) callback and currently, if we change the sheet the internal clipboard gets cleared that is why on the second paste only the value gets pasted which comes from the system clipboard. However, this feature is currently in our backlog and it will be available in our upcoming future releases but currently we do not have any ETA. The internal ID for tracking this issue will be SJS-7977.

    Regards,

    Avinash

Need extra support?

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

Learn More

Forum Channels