Name
pivottable.CreateCubeFile(File, [Measures], [Levels], [Members], [Properties])
Synopsis
For OLAP pivot tables, saves the table as a view of the OLAP data cube.
|
Argument |
Settings |
|---|---|
|
|
The name of the file to create. |
|
|
An array of names of the OLAP measures to include in the file. |
|
|
An array of names of the OLAP level names to include in the file. |
|
|
An array of the names of top-level members in the dimension to include in the file. |
|
|
True includes member property settings in the file; False omits properties. Default is True. |
The following code saves an OLAP pivot table as a local cube file:
Sub SaveOLAPCube( )
Dim pt As PivotTable
' Run CreateOLAPPivotTable to create this pivot table.
Set pt = Worksheets("FoodMart Sales").PivotTables(1)
' Save table as a local cube file.
pt.CreateCubeFile ThisWorkbook.Path & "\" & pt.Name & ".cub"
End SubBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access