Message-ID: <2112096899.8341.1711642853283.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8340_1015794586.1711642853283" ------=_Part_8340_1015794586.1711642853283 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html CopyPasteProperties

CopyPasteProperties

Description

=20

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

=20
C#
=20
 public sealed class CopyPasteProperties
=20
=20
vb.net
=20
Public NotInheritable Class CopyPasteProperties
=20
=20

Remarks

=20

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

=20

To create a CopyPasteProperties object, call the CreateCopyPasteProperties() method on a Workbook<= /a> object.

=20

Examples

=20
C#
=20

          ExcelApplication xla =3D new ExcelApplication();
          Workbook wb =3D xla.Create();
          CopyPasteProperties properties =3D
               wb.CreateCopyPasteProperties(CopyPasteProperties.CopyPasteTy=
pe.All);
          Area areaToCopy =3D wb.Worksheets[0].CreateArea(0, 0, 3, 3);
          Worksheet ws =3D wb.Worksheets[0];
          ws.CopyPaste(0, 0, areaToCopy, properties);
        
=20
=20
vb.net
=20

          Dim xla As New ExcelApplication()
          Dim wb As Workbook =3D xla.Create()
          Dim properties As CopyPasteProperties =3D _
               wb.CreateCopyPasteProperties(CopyPasteProperties.CopyPasteTy=
pe.All)
          Dim areaToCopy as Area =3D wb.Worksheets(0).CreateArea(0, 0, 3, 3=
)
          Dim ws as Worksheet =3D wb.Worksheets(0)
          ws.CopyPaste(0, 0, areaToCopy, properties)
        
=20
=20

Properties

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

CopyColumnWidth

A boolean value indicating whether or not to cop= y column width.

CopyComments

A boolean value indicating whether or not to cop= y comments. If this value is set to true, then any comments attached to cel= ls in the copy area will be copied.

CopyFormatting

A boolean value indicating whether or not to cop= y cell formatting. Cell formatting includes font, color, number formatting,= fill color, fill pattern and borders.

CopyFormulas

A boolean value indicating whether or not to cop= y cell formulas.

CopyMergedCells

A boolean value indicating whether or not to cop= y merged cells.

CopyRowHeight

A boolean value indicating whether or not to cop= y row height.

CopyValues

A boolean value indicating whether or not to cop= y cell values. If the CopyFormulas property is set to false, then the final= value of any formulas will be copied.
=20

Nested Classes

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

CopyPasteType

A CopyPasteType value specifies the type of data that will b= e copied.
------=_Part_8340_1015794586.1711642853283--