共用方式為


XmlMappedRange.Count 屬性

取得 XmlMappedRange 控制項中的物件數目。

命名空間:  Microsoft.Office.Tools.Excel
組件:  Microsoft.Office.Tools.Excel (在 Microsoft.Office.Tools.Excel.dll 中)

語法

'宣告
ReadOnly Property Count As Integer
    Get
int Count { get; }

屬性值

型別:System.Int32
XmlMappedRange 控制項中的物件數目。

範例

下列程式碼範例使用 Count 屬性來顯示 XmlMappedRange 中的物件數目。 這個程式碼範例假設目前工作表包含名為 CustomerLastNameCell 的 XmlMappedRange

Private Sub DisplayCount()
    MsgBox("There are " & Me.CustomerLastNameCell.Count & _
        " items in the XmlMappedRange.")
End Sub
private void DisplayCount()
{
    MessageBox.Show("There are " + this.CustomerLastNameCell.Count +
        " items in the XmlMappedRange.");
}

.NET Framework 安全性

請參閱

參考

XmlMappedRange 介面

Microsoft.Office.Tools.Excel 命名空間