ListObject::DataBoundFormat Property
Gets or sets the format style for data-bound ListObject controls.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
property XlRangeAutoFormat DataBoundFormat { XlRangeAutoFormat get(); void set(XlRangeAutoFormat value); }
Property Value
Type: Microsoft.Office.Interop.Excel::XlRangeAutoFormatOne of the XlRangeAutoFormat values.
The ListObject control must be bound to data before you can use this property.
The specified format is applied to the entire list object, including rows that are added later.
To remove formatting, set DataBoundFormat to xlRangeAutoFormatNone.
Use DataBoundFormatSettings to exclude specific types of formatting such as pattern, font, or width from the style.
The following code example creates a DataTable and a ListObject, and binds the ListObject to the DataTable. It then uses an XlRangeAutoFormat value to format the ListObject.
This example is for a document-level customization.
Show: