[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PasteOption

PasteOption Class

Represents options that control how a copied range is pasted.

Use this class with Copy(IRange, PasteOption) to specify whether hidden cells are included in the paste operation and which PasteType values are pasted. A new instance allows pasting hidden ranges by default, and its default paste type includes formulas and formats.

Inheritance
PasteOption
Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public class PasteOption
Public Class PasteOption
Examples
worksheet.Range["A1:B3"].Value = new object[,] {
    {"Name", "Value"},
    {"Alice", 100},
    {"Bob", 200}
};
PasteOption option = new PasteOption();
option.AllowPasteHiddenRange = false;
worksheet.Range["A1:B3"].Copy(worksheet.Range["D10"], option);

Constructors

Name Description
PasteOption()

Properties

Name Description
AllowPasteHiddenRange

Gets or sets whether hidden cells in the copied range are included in the paste operation.

Use this property with Copy(IRange, PasteOption) to determine whether content from hidden rows or columns is pasted. A new PasteOption instance allows pasting hidden ranges by default.

PasteType

Gets or sets the paste type that is applied during a range copy operation.

Use this property with Copy(IRange, PasteOption) to inspect or reuse the current paste configuration. A new PasteOption instance returns a set containing Formulas and Formats by default.