Wiki Markup |
---|
{description} {excerpt}The [CopyPasteProperties|CopyPasteProperties] object represents the types of data that will be copied from a worksheet when you call the [CopyPaste()|Worksheet.CopyPaste] method. {excerpt} {signature:C#} public sealed class CopyPasteProperties {signature}{signature:vb.net} Public NotInheritable Class CopyPasteProperties {signature} {remarks} You can use the [CopyPasteType|CopyPasteProperties.CopyPasteType] enumeration to specify the type of data that will be copied. If you set {{CopyPasteType}} to [None|CopyPasteProperties.CopyPasteType#None], then you must set individual properties on the {{CopyPasteProperties}} object before calling the {{CopyPaste()}} method. To create a CopyPasteProperties object, call the [CreateCopyPasteProperties()|Workbook.CreateCopyPasteProperties(CopyPasteProperties.CopyPasteType)] method on a [Workbook|Workbook] object. {remarks} {example}{code:csharp|title=C#} ExcelApplication xla = new ExcelApplication(); Workbook wb = xla.Create(); CopyPasteProperties properties = wb.CreateCopyPasteProperties(CopyPasteProperties.CopyPasteType.All); Area areaToCopy = wb.Worksheets[0].CreateArea(0, 0, 3, 3); Worksheet ws = wb.Worksheets[0]; ws.CopyPaste(0, 0, areaToCopy, properties); {code} {code:vb.net|title=vb.net} Dim xla As New ExcelApplication() Dim wb As Workbook = xla.Create() Dim properties As CopyPasteProperties = _ wb.CreateCopyPasteProperties(CopyPasteProperties.CopyPasteType.All) Dim areaToCopy as Area = wb.Worksheets(0).CreateArea(0, 0, 3, 3) Dim ws as Worksheet = wb.Worksheets(0) ws.CopyPaste(0, 0, areaToCopy, properties) {code} {example} {properties} ||Name||Description|| |[CopyColumnWidth|CopyPasteProperties.CopyColumnWidth]|{excerpt-include:CopyPasteProperties.CopyColumnWidth|nopanel=true}| |[CopyComments|CopyPasteProperties.CopyComments]|{excerpt-include:CopyPasteProperties.CopyComments|nopanel=true}| |[CopyFormatting|CopyPasteProperties.CopyFormatting]|{excerpt-include:CopyPasteProperties.CopyFormatting|nopanel=true}| |[CopyFormulas|CopyPasteProperties.CopyFormulas]|{excerpt-include:CopyPasteProperties.CopyFormulas|nopanel=true}| |[CopyMergedCells|CopyPasteProperties.CopyMergedCells]|{excerpt-include:CopyPasteProperties.CopyMergedCells|nopanel=true}| |[CopyRowHeight|CopyPasteProperties.CopyRowHeight]|{excerpt-include:CopyPasteProperties.CopyRowHeight|nopanel=true}| |[CopyValues|CopyPasteProperties.CopyValues]|{excerpt-include:CopyPasteProperties.CopyValues|nopanel=true}| {classes} ||Name||Description|| |[CopyPasteType|CopyPasteProperties.CopyPasteType]|{excerpt-include:CopyPasteProperties.CopyPasteType|nopanel=true}| |
Page History
Overview
Content Tools