Workbook.DefaultPivotTableStyle Property (2007 System)
Gets or sets the table style from the TableStyles property that is used as the default style for PivotTable reports in the workbook.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public Property DefaultPivotTableStyle As Object
'Usage
Dim instance As Workbook
Dim value As Object
value = instance.DefaultPivotTableStyle
instance.DefaultPivotTableStyle = value
[BrowsableAttribute(false)]
public Object DefaultPivotTableStyle { get; set; }
[BrowsableAttribute(false)]
public:
property Object^ DefaultPivotTableStyle {
Object^ get ();
void set (Object^ value);
}
public function get DefaultPivotTableStyle () : Object
public function set DefaultPivotTableStyle (value : Object)
Property Value
Type: System.Object
The table style from the TableStyles property that is used as the default style for PivotTable reports in the workbook.
Examples
The following code example sets the default style of pivot tables to Pivot Style Medium 3, which is a style that is available in Excel on the Design tab in the PivotTable Styles group when a pivot table is selected.
This example is for a document-level customization.
Private Sub SetPivotTableStyle()
Me.DefaultPivotTableStyle = Me.TableStyles("PivotStyleMedium3")
End Sub
private void SetPivotTableStyle()
{
this.DefaultPivotTableStyle = this.TableStyles["PivotStyleMedium3"];
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.