Version

DefaultTableStyle Property

Gets or sets the default style for tables in the workbook.
Syntax
'Declaration
 
Public Property DefaultTableStyle As WorksheetTableStyle
public WorksheetTableStyle DefaultTableStyle {get; set;}
Exceptions
ExceptionDescription
System.ArgumentExceptionThe specified value is not in the CustomTableStyles or StandardTableStyles collections.
Remarks

This can be set to any WorksheetTableStyle in the CustomTableStyles or StandardTableStyles collection.

This will never return a null value. If it is set to null, it will be reset to the TableStyleMedium2 table style.

If this value is changed, it will not be applied to existing tables in the workbook. Only newly created tables will use default table style on the workbook.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also