編輯

共用方式為


_Worksheet.PasteSpecial Method

Definition

Pastes the contents of the Clipboard onto the sheet using a specified format. Use this method to paste data from other applications or to paste data in a specific format.

public void PasteSpecial (object Format, object Link, object DisplayAsIcon, object IconFileName, object IconIndex, object IconLabel, object NoHTMLFormatting);
Public Sub PasteSpecial (Optional Format As Object, Optional Link As Object, Optional DisplayAsIcon As Object, Optional IconFileName As Object, Optional IconIndex As Object, Optional IconLabel As Object, Optional NoHTMLFormatting As Object)

Parameters

Format
Object

Optional Object. A string that specifies the Clipboard format of the data.

Link
Object

Optional Object. True to establish a link to the source of the pasted data. If the source data isn’t suitable for linking or the source application doesn't support linking, this parameter is ignored. The default value is False.

DisplayAsIcon
Object

Optional Object. True to display the pasted data as an icon. The default value is False.

IconFileName
Object

Optional Object. The name of the file that contains the icon to use if DisplayAsIcon is True.

IconIndex
Object

Optional Object. The index number of the icon within the icon file.

IconLabel
Object

Optional Object. The text label of the icon.

NoHTMLFormatting
Object

Optional Object. True to remove all formatting, hyperlinks, and images from HTML. False to paste HTML as is. The default value is False.

Remarks

NoHTMLFormatting will only matter when Format = “HTML”. In all other cases, NoHTMLFormatting will be ignored.

You must select the destination range before you use this method.

This method may modify the sheet selection, depending on the contents of the Clipboard.

Applies to