XmlMappedRange.CopyPicture(XlPictureAppearance, XlCopyPictureFormat) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将 XmlMappedRange 控件作为图片复制到剪贴板。
public object CopyPicture (Microsoft.Office.Interop.Excel.XlPictureAppearance Appearance = Microsoft.Office.Interop.Excel.XlPictureAppearance.xlScreen, Microsoft.Office.Interop.Excel.XlCopyPictureFormat Format = Microsoft.Office.Interop.Excel.XlCopyPictureFormat.xlPicture);
abstract member CopyPicture : Microsoft.Office.Interop.Excel.XlPictureAppearance * Microsoft.Office.Interop.Excel.XlCopyPictureFormat -> obj
Public Function CopyPicture (Optional Appearance As XlPictureAppearance = Microsoft.Office.Interop.Excel.XlPictureAppearance.xlScreen, Optional Format As XlCopyPictureFormat = Microsoft.Office.Interop.Excel.XlCopyPictureFormat.xlPicture) As Object
参数
- Appearance
- XlPictureAppearance
指定应如何复制图片。可以是以下 XlPictureAppearance 常量之一: xlPrinterxlScreen
- Format
- XlCopyPictureFormat
图片的格式。可以是以下 XlCopyPictureFormat 常量之一: xlBitmapxlPicture
返回
示例
下面的代码示例使用 CopyPicture 方法将 作为 XmlMappedRange 位图复制到剪贴板。 此代码示例假定当前工作表包含名为 XmlMappedRangeCustomerLastNameCell
的 。
private void CopyAsBitmap()
{
this.CustomerLastNameCell.Value2 = "Smith";
this.CustomerLastNameCell.CopyPicture(
Excel.XlPictureAppearance.xlScreen,
Excel.XlCopyPictureFormat.xlBitmap);
}
Private Sub CopyAsBitmap()
Me.CustomerLastNameCell.Value2 = "Smith"
Me.CustomerLastNameCell.CopyPicture( _
Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlBitmap)
End Sub
注解
可选参数
有关可选参数的信息,请参阅 Office 解决方案中的可选参数。