全部显示

DisplayEmptyColumn 属性

       

如果对数值轴的 OLAP 提供程序的查询中包括非空 MDX 关键字,则返回 True。在结果集中,OLAP 提供程序不返回空列。如果省略非空关键字,则返回 FalseBoolean 类型,可读写。

expression.DisplayEmptyColumn

expression   必需。该表达式返回一个 PivotTable 对象。

说明

数据透视表必须与一个联机分析处理 (OLAP) 数据源相连,以避免运行错误。

示例

本示例确定数据透视表中空列的显示设置。本示例假定与 OLAP 数据源相连的数据透视表位于活动工作表上。

Sub CheckSetting()

    Dim pvtTable As PivotTable

    Set pvtTable = ActiveSheet.PivotTables(1)

    ' Determine display setting for empty columns.
    If pvtTable.DisplayEmptyColumn = False Then
        MsgBox "Empty columns will not be displayed."
    Else
        MsgBox "Empty columns will be displayed."
    End If

End Sub