A newer version of this page is available. Switch to the current version.

How to: Set Default Table Style

This example demonstrates how to specify the default table style. This style is used in the following cases.

  • If you create a table and do not explicitly specify a style to be applied to this table, the default style will be automatically applied to the created table.
  • If you remove a table style that has been previously applied to a table, the table style will be changed to the default style.

A complete sample project is available at https://github.com/DevExpress-Examples/how-to-format-tables-e4909

void ChangeDefaultTableStyle(IWorkbook workbook, string styleName) {
    // Set the style to be applied to created tables by default.
    workbook.TableStyles.DefaultStyle = workbook.TableStyles[styleName];
See Also