在 GridDesktop 中控件内部和控件与 Excel 之间复制和粘贴行
Contents
[
Hide
]
如果您想在 GridDesktop 中启用控件内或控件与 Excel 之间的行复制和粘贴,请将 GridDesktop.ClipboardCopyPaste 属性设置为 true。您可以在设计时或在代码中设置此属性。此属性的默认值为 false。目前,它只能复制和粘贴单元格值,不会复制单元格的任何其他设置,如格式,边框样式等。
在设计模式和运行时设置GridDesktop.ClipboardCopyPaste属性
以下示例代码在运行时设置GridDesktop.ClipboardCopyPaste属性。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
/* | |
* Indicates whether to copy/paste based on clipboard, so that it can copy/paste with MS-EXCEL. | |
* It will only copy/paste cell value and will not copy any other setting of the cell like format, border style and so on. | |
* The default value is false. | |
*/ | |
gridDesktop1.EnableClipboardCopyPaste = true; |