Compartir a través de


Range.PasteSpecial Method

Pastes a Range from the Clipboard into the specified range.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function PasteSpecial ( _
    Paste As XlPasteType, _
    Operation As XlPasteSpecialOperation, _
    SkipBlanks As Object, _
    Transpose As Object _
) As Object
'Usage
Dim instance As Range
Dim Paste As XlPasteType
Dim Operation As XlPasteSpecialOperation
Dim SkipBlanks As Object
Dim Transpose As Object
Dim returnValue As Object

returnValue = instance.PasteSpecial(Paste, _
    Operation, SkipBlanks, Transpose)
Object PasteSpecial(
    XlPasteType Paste,
    XlPasteSpecialOperation Operation,
    Object SkipBlanks,
    Object Transpose
)

Parameters

  • Paste
    Type: Microsoft.Office.Interop.Excel.XlPasteType

    Optional XlPasteType. The part of the range to be pasted. Can be one of the following XlPasteType constants:

    • xlPasteAll default

    • xlPasteAllExceptBorders

    • xlPasteColumnWidths

    • xlPasteComments

    • xlPasteFormats

    • xlPasteFormulas

    • xlPasteFormulasAndNumberFormats

    • xlPasteValidation

    • xlPasteValues

    • xlPasteValuesAndNumberFormats

  • SkipBlanks
    Type: System.Object

    Optional Object. True to not have blank cells in the range on the Clipboard pasted into the destination range. The default value is False.

  • Transpose
    Type: System.Object

    Optional Object. True to transpose rows and columns when the range is pasted. The default value is False.

Return Value

Type: System.Object

See Also

Reference

Range Interface

Range Members

Microsoft.Office.Interop.Excel Namespace