FormatSettings Enumeration
Specifies the type of formatting that is applied to the ListObject when it is bound to data.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
| Member name | Description | |
|---|---|---|
| Alignment | Indicates whether to include an alignment in the predefined XlRangeAutoFormat. | |
| Border | Indicates whether to include border formats in the predefined XlRangeAutoFormat. | |
| Font | Indicates whether to include font formats in the predefined XlRangeAutoFormat | |
| Number | Indicates whether to include the number formats in the predefined XlRangeAutoFormat. | |
| Pattern | Indicates whether to include the pattern formats in the predefined XlRangeAutoFormat. | |
| Width | Indicates whether to include the column width and row height in the predefined XlRangeAutoFormat. |
There are six settings that combine to specify formatting. Using this enumeration, you can select which settings to apply to the ListObject. By default all format settings are applied.
The following code example creates a DataTable and a ListObject, and binds the ListObject to the DataTable. It then applies the font and pattern formats of a predefined XlRangeAutoFormat value to the ListObject.
This example is for a document-level customization.