ChartSheet.CopyPicture Yöntem

Tanım

' İ ChartSheet panoya resim olarak kopyalar.

public void 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, Microsoft.Office.Interop.Excel.XlPictureAppearance Size = Microsoft.Office.Interop.Excel.XlPictureAppearance.xlPrinter);

Parametreler

Appearance
XlPictureAppearance

Resmin nasıl kopyalanacağını belirtir.

Format
XlCopyPictureFormat

Resmin biçimi.

Size
XlPictureAppearance

Nesne bir grafik sayfasında (çalışma sayfasına katıştırılmamış) bir grafik olduğunda kopyalanmış resmin boyutu.

Örnekler

Aşağıdaki kod örneği, CopyPicture geçerli Microsoft.Office.Tools.Excel.ChartSheet öğeyi panoya bir bit eşlem olarak kopyalamak için yöntemini kullanır.

private void CopyChartSheetAsBitmap()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.SetSourceData(Globals.Sheet1.Range["A1", "B5"],
        Excel.XlRowCol.xlColumns);
    this.ChartType = Excel.XlChartType.xlColumnClustered;

    this.CopyPicture(Excel.XlPictureAppearance.xlScreen,
        Excel.XlCopyPictureFormat.xlBitmap,
        Excel.XlPictureAppearance.xlScreen);
}
Private Sub CopyChartSheetAsBitmap()
    Globals.Sheet1.Range("A1", "A5").Value2 = 22
    Globals.Sheet1.Range("B1", "B5").Value2 = 55

    Me.SetSourceData(Globals.Sheet1.Range("A1", "B5"), _
        Excel.XlRowCol.xlColumns)
    Me.ChartType = Excel.XlChartType.xlColumnClustered

    Me.CopyPicture(Excel.XlPictureAppearance.xlScreen, _
        Excel.XlCopyPictureFormat.xlBitmap, _
        Excel.XlPictureAppearance.xlScreen)
End Sub

Açıklamalar

İsteğe Bağlı Parametreler

İsteğe bağlı parametreler hakkında daha fazla bilgi için bkz. Office çözümlerinde Isteğe bağlı parametreler.

Şunlara uygulanır