Copy Worksheet to clipboard

Hi


How can I copy the content of a worksheet to the clipboard and can I copy several worksheets at once?

Hi Ian,


Thank you for contacting Aspose support.

I am afraid, Aspose.Cells APIs do not provide any means to copy the contents of the worksheet (or whole worksheet) to clipboard. Please provide more details of your scenario so we could try to find any alternative solution for it.

I just want to copy the content of a sheet to Clipboard and allow the client to paste to excel

Hi again,


Please note, Aspose.Cells APIs being back-end class library do not provide the said feature, however, the visual component, Aspose.Cells.GridDesktop provides this feature, that is; you can copy the contents between Excel and Aspose.Cells.GridDesktop. All you need to do is to enable the GridDesktop.EnableClipboardCopyPaste property as demonstrated below.

C#

this.gridDesktop1.EnableClipboardCopyPaste = true;

is there no way to copy data from the aspose grid to Excel?

Hi Ian,


As narrated above, Aspose.Cells.GridDesktop allows you to copy the contents from GridDesktop interface to Excel with simple copy/paste commands/shortcut. You need to set the EnableClipboardCopyPaste property to true for it. Have I misunderstood your concerns?

so the user needs to use the keyboard shortcut Ctrl+C to copy the data? Is there no code command to invoke this action or am I not understanding this?

Hi Ian,


You can also use the GridDesktop.Copy method to copy the focused cell contents to the clipboard. Please note, you still need to set the GridDesktop.EnableClipboardCopyPaste property to true in order to use this feature.