[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PasteType

PasteType Enum

Specifies the type of content to paste during a range copy operation.

Used with Copy(IRange, PasteOption) or PasteType to control which aspects of the source range are pasted to the destination. Multiple values can be combined using bitwise OR (e.g., PasteType.Values | PasteType.Formats).

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
[Flags]
public enum PasteType
<Flags>
Public Enum PasteType
Examples
worksheet.Range["A1:B2"].Value = new object[,] {
    {"Name", "Price"},
    {"Apple", 1.99}
};
worksheet.Range["A1:B1"].Font.Bold = true;
worksheet.Range["A1:B2"].Copy(worksheet.Range["D1"], new PasteOption { PasteType = PasteType.Values });

Fields

Name Description
ColumnWidths

Specifies to only paste column widths.

Default

Specifies to paste all data except RowHeights and ColumnWidths.

Formats

Specifies to only paste formats.

Formulas

Specifies to only paste cell formulas.

NumberFormats

Specifies to only paste number formats.

RowHeights

Specifies to only paste row heights.

Values

Specifies to only paste cell values.