PivotTable.CreateCubeFile (Excel)

Creates a cube file from a PivotTable report connected to an Online Analytical Processing (OLAP) data source.

CreateCubeFile (File, Measures, Levels, Members, Properties)


Dim strFile As String: strFile = 
Dim strCreateCubeFile As String
strCreateCubeFile = ActiveCell.PivotTable.CreateCubeFile(File:=strFile)

Arguments

The following argument is required

File (String) - The name of the cube file to be created. It will overwrite the file if it already exists.

Optional arguments

The following arguments are optional

Measures (String) - An array of unique names of measures that are to be part of the slice.

Levels (String) - An array of strings. Each array item is a unique level name. It represents the lowest level of a hierarchy that is in the slice.

Members (String) - An array of string arrays. The elements correspond, in order, to the hierarchies represented in the Levels array. Each element is an array of string arrays that consists of the unique names of the top level members in the dimension that are to be included in the slice.

Properties (Boolean) - False results in no member properties being included in the slice. The default value is True.