Freigeben über


WorksheetBase.Name-Eigenschaft

Ruft den Namen des Arbeitsblatts ab oder legt ihn fest.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public Property Name As String
    Get
    Set
public string Name { get; set; }

Eigenschaftswert

Typ: System.String
Der Name des Arbeitsblatts.

Hinweise

Im folgenden Codebeispiel wird die MailEnvelope-Eigenschaft verwendet, um der Einleitung einen E-Mail-Header für das Arbeitsblatt den Name des Arbeitsblatts zuzuweisen.

Dieses Beispiel bezieht sich auf eine Anpassung auf Dokumentebene.

Private Sub SetMailEnvelopeIntro()
    Me.MailEnvelope.Introduction = _
        "This is worksheet " & Me.Name
    MsgBox("The MailEnvelope introduction is: " & _
        Me.MailEnvelope.Introduction)
End Sub
private void SetMailEnvelopeIntro()
{
    this.MailEnvelope.Introduction = "This is worksheet " + this.Name;
    MessageBox.Show("The MailEnvelope introduction is: " +
        this.MailEnvelope.Introduction);
}

.NET Framework-Sicherheit

Siehe auch

Referenz

WorksheetBase Klasse

Microsoft.Office.Tools.Excel-Namespace