Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / PasteOptions Enumeration
Example Example


In This Topic
    PasteOptions Enumeration
    In This Topic
    Determines what kind of data will be pasted into the new location.
    Syntax
    'Declaration
     
    
    <FlagsAttribute()>
    Public Enum PasteOptions 
       Inherits System.Enum
    'Usage
     
    
    Dim instance As PasteOptions
    [Flags()]
    public enum PasteOptions : System.Enum 
    Members
    MemberDescription
    AllPastes all of the Cell or CellRange's content, as well as how it is formatted.
    DataValidationPastes only the data validation rules found in the original Cell or CellRange.
    FormattingPastes only the formatting of the original Cell or CellRange.
    FormulasPastes only the formulas found in the original Cell or CellRange, without any formatting or comments. 
    NoneSpecifies that no mathematical operation will be applied to the pasted data.
    TransposePastes & reorients the content of the original Cell or CellRange; this means that the data in Rows will be pasted into Columns & vice versa.
    ValuesPastes the formula results found in the original Cell or CellRange, without any formatting or comments.
    Remarks
    This is a bitwise enumeration, which means that many options can be set concurrently by using the pipe symbol ("|"). 
    Example
    // Copies a CellRange & pastes it, keeping the original formatting the the formula results (the values) only.
    worksheet.Cells[ "D4", "H12" ].CopyAndPasteTo( "D47", PasteOptions.Formatting | PasteOptions.Values );
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             Xceed.Workbooks.NET.PasteOptions

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also