WPS 加载项开发 > 表格 API 参考 > PivotCell > 属性 > PivotCell.RowItems 属性
返回一个 PivotItemList 集合,该集合对应于分类轴上表示选定单元格的项目。

语法

表达式.RowItems

表达式   一个代表 PivotCell 对象的变量。

示例

本示例判断单元格 B5 中的数据项是否在第一个行字段中的“Inventory”项之下,并通知用户。本示例假定数据透视表位于活动工作表上,并且工作表的列 B 包含数据透视表的行项目。

示例代码
function CheckRowItems() {

    // Determine if there is a match between the item and row field.
									
    if(Application.Range("B5").PivotCell.RowItems.Item(1) == "Inventory" ) {
        MsgBox("Cell B5 is a member of the 'Inventory' row field.")
    }									
    else {
        MsgBox("Cell B5 is not a member of the 'Inventory' row field.")
    }
								
}


请参阅