Share via


ListObject.AutoSetDataBoundColumnHeaders Property

Gets or sets a value that determines whether the column headers are automatically set to match the data source.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Syntax

'Declaration
Property AutoSetDataBoundColumnHeaders As Boolean
    Get
    Set
bool AutoSetDataBoundColumnHeaders { get; set; }

Property Value

Type: System.Boolean
true to automatically set the column names; otherwise, false. The default is false.

Remarks

When set to true, this property causes the column header of each column in the ListObject control to match the corresponding column header of the data source.

The person using the worksheet cannot change the column headers when this property is set to true. If the column header is changed, it will revert back to match the data source when the user shifts focus away from the header cell.

.NET Framework Security

See Also

Reference

ListObject Interface

Microsoft.Office.Tools.Excel Namespace