WPS 加载项开发 > 表格 API 参考 > PivotCache > 属性 > PivotCache.OLAP 属性
如果数据透视表缓存与联机分析处理 (OLAP) 服务器相连,则返回 True。只读 Boolean 类型。

语法

表达式.OLAP

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

示例

本示例确定缓存是否与 OLAP 服务器相连。本示例假定数据透视表位于活动工作表上。

示例代码
function CheckPivotCache() {

    // Determine if PivotCache has OLAP connection.
    if(Application.ActiveWorkbook.PivotCaches().Item(1).OLAP == true) {
        MsgBox ("The PivotCache is connected to an OLAP server")
    }
    else {
        MsgBox ("The PivotCache is not connected to an OLAP server.")
    }
										
}


请参阅