Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Description

Excerpt

The CopyPasteProperties object represents the types of data that will be copied from a worksheet when you call the CopyPaste() method.

Signature
C#C#
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}{signature:vb.net
vb.net
}
Public NotInheritable Class CopyPasteProperties
Remarks

You can use the CopyPasteType enumeration to specify the type of data that will be copied. If you set CopyPasteType to None, then you must set individual properties on the CopyPasteProperties object before calling the CopyPaste() method.

To create a CopyPasteProperties object, call the CreateCopyPasteProperties() method on a Workbook object.

{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)
        
Example
Code Block
csharpcsharp
titleC#
Code Block
vb.nettitle
Properties

...

Name

...

Description

...

CopyColumnWidth

...

{code}

{example}
{properties}
||Name||Description||
|[CopyColumnWidth|CopyPasteProperties.CopyColumnWidth]|{excerpt-include:CopyPasteProperties.CopyColumnWidth

...

CopyComments

|nopanel=true}|
|[CopyComments|CopyPasteProperties.CopyComments]|{excerpt-include

...

:CopyPasteProperties.CopyComments

...

CopyFormatting

|nopanel=true}|
|[CopyFormatting|CopyPasteProperties.CopyFormatting]|{excerpt-include

...

:CopyPasteProperties.CopyFormatting

...

CopyFormulas

|nopanel=true}|
|[CopyFormulas|CopyPasteProperties.CopyFormulas]|{excerpt-include

...

:CopyPasteProperties.CopyFormulas

...

CopyMergedCells

|nopanel=true}|
|[CopyMergedCells|CopyPasteProperties.CopyMergedCells]|{excerpt-include

...

:CopyPasteProperties.CopyMergedCells

...

CopyRowHeight

|nopanel=true}|
|[CopyRowHeight|CopyPasteProperties.CopyRowHeight]|{excerpt-include

...

:CopyPasteProperties.CopyRowHeight

...

CopyValues

|nopanel=true}|
|[CopyValues|CopyPasteProperties.CopyValues]|{excerpt-include

...

:CopyPasteProperties.CopyValues

...

Classes

...

Name

...

Description

...

CopyPasteType

...

|nopanel=true}|
{classes}
||Name||Description||
|[CopyPasteType|CopyPasteProperties.CopyPasteType]|{excerpt-include:CopyPasteProperties.CopyPasteType|nopanel=true}|