Aracılığıyla paylaş


WorksheetBase.Type Özellik

Çalışma türü alır.

Ad alanı:  Microsoft.Office.Tools.Excel
Derleme:  Microsoft.Office.Tools.Excel.v4.0.Utilities (Microsoft.Office.Tools.Excel.v4.0.Utilities.dll içinde)

Sözdizimi

'Bildirim
Public ReadOnly Property Type As XlSheetType
    Get
public XlSheetType Type { get; }

Özellik Değeri

Tür: Microsoft.Office.Interop.Excel.XlSheetType
Birini XlSheetType değerler.

Örnekler

Aşağıdaki kod örneği Type özelliğine görüntülenip geçerli çalışma sayfasının olduğu bir çalışma, bir iletişim kutusu sayfası veya grafiği bir ileti kutusu.

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private Sub ShowType()
    Select Case Me.Type
        Case Excel.XlSheetType.xlWorksheet
            MsgBox("This is a worksheet.")
        Case Excel.XlSheetType.xlDialogSheet
            MsgBox("This is a dialogsheet.")
        Case Excel.XlSheetType.xlChart
            MsgBox("This is a chart.")
    End Select
End Sub
private void ShowType()
{
    switch (this.Type)
    {
        case Excel.XlSheetType.xlWorksheet:
            MessageBox.Show("This is a worksheet.");
            break;
        case Excel.XlSheetType.xlDialogSheet:
            MessageBox.Show("This is a dialogsheet.");
            break;
        case Excel.XlSheetType.xlChart:
            MessageBox.Show("This is a chart.");
            break;
    }
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

WorksheetBase Sınıf

Microsoft.Office.Tools.Excel Ad Alanı