# createPivotCache-创建透视表缓存
调用createPivotCache函数在工作部中创建透视表缓存。
最小支持版本:5.0.0
# 接口说明
1.已打开的工作簿对象,详情请参见open (opens new window)。
2.已获取Excel区域对象, 详情请参见getRange (opens new window)。
# 语法
<ExcelWorkbook object>.createPivotCache(<sourceType>, <sourceData>, <version>)
1
<ExcelWorkbook object>.创建透视表缓存(<sourceType>, <sourceData>, <version>)
1
# 函数类型
实例函数
# 请求参数
参数名称 | 类型 | 是否必选 | 默认值 | 示例值 | 描述 |
---|---|---|---|---|---|
sourceType | Cube.Lang.Number | 是 | 无 | 3 | 数据源类型。 1: Microsoft Excel list or database. 2: Data from another application. 3: Multiple consolidation ranges. 4: Data is based on scenarios created using the Scenario Manager. -4148: 与另一数据透视表使用相同数据透视源(Same source as another PivotTable report.) |
sourceData | Cube.Object | 是 | 无 | Cube.App.Excel.ExcelRange | 源数据。 |
version | Cube.Lang.Number | 是 | 无 | 5 | 透视表缓存版本。 0: 对应 Excel 2000 版本 1: 对应 Excel 2002 版本 2: 对应 Excel 2007 版本 4: 对应 Excel 2010 版本 5: 对应 Excel 2013 版本 -1: 仅兼容之前的版本 -2: 不指定版本 |
# 返回参数
参数名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Result | Cube.App.Excel.ExcelPivotCache | Cube.App.Excel.ExcelPivotCache | 透视表缓存对象。 |
# 请求示例
工作簿对象.createPivotCache(3,Excel区域对象, 5)
1
最近更新时间: {
"value": "2023-09-12",
"effect": true
}