Copying Floating object

Posted by: sbhadane on 5 March 2025, 4:35 am EST

  • Posted 5 March 2025, 4:35 am EST

    I am trying to copy a floating object but can’t find any excute command in ‘GC.Spread.Sheets.Commands’.

    I can paste the floating object using

    spread.commandManager().execute({cmd: “pasteFloatingObjects”, sheetName: “Sheet1”});

    but for copying floating objects can’t find any command , How can I achieve it and is there any workaround.

  • Posted 6 March 2025, 2:45 am EST - Updated 6 March 2025, 2:50 am EST

    Hi,

    It is possible to copy the floating objects using the dragCopyFloatingObjects command, which copies and pastes the floating object in the sheet at the specified offset. Please refer to the below code snippet that illustrates how to use this command to copy the floating objects -

    spread.commandManager().execute({
      cmd: "dragCopyFloatingObjects",
      sheetName: spread.getActiveSheet().name(),
      floatingObjects: [floating objects name],
      offsetX: 10,
      offsetY: 20,
    });

    You can also refer to the attached sample, which uses the above code snippet and copies the floating objects.

    In addition, we are also discussing with the development team if it is possible to simply copy the floating objects without pasting. The internal tracking ID for the same is SJS-28479.

    Please feel free to reach out if you encounter any further issues or require additional guidance.

    Regards,

    Ankit

    FloatingObjCopy (1).zip

  • Posted 6 March 2025, 2:54 am EST

    Hi Ankit,

    Thanks you for the response .

    I was specifically looking to simply copy the floating object to the clipboard.

    Thank you for opening the internal ticket , that feature would be beneficial for us.

    How would I will be follow up with the internal tracking id. Is there any forum where it can be tracked.

    Regards,

    Saurabh

  • Posted 7 March 2025, 1:49 am EST

    Hi Saurabh,

    The tracking of the developer discussions is internal to our organization. We will update you as soon as the development team provides us with any information regarding your case.

    Additionally, we have provided you a support ticket ( SJS-28479 ) associated with the discussions, which you can tell us, and we will update you regarding the updates on your case. However, we will update you promptly as per developer comments.

    Besides this, could you please elaborate on your use case of using a command to copy the floating objects as the floating objects can also be copied to the SpreadJS clipboard using the shortcut key - Ctrl + C.

    Please let us know if you require any further clarifications.

    Best Regards,

Need extra support?

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

Learn More

Forum Channels