Skip to main content

ExcelSourceOptionsBase.UseFirstRowAsHeader Property

Gets or sets whether to process the values of the first row as headers.

Namespace: DevExpress.DataAccess.Excel

Assembly: DevExpress.DataAccess.v24.2.dll

Declaration

[DefaultValue(true)]
public bool UseFirstRowAsHeader { get; set; }

Property Value

Type Default Description
Boolean true

true, to process the values of the first row as headers; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to UseFirstRowAsHeader
Cross-Platform Class Library BeforeFillEventArgs
.SourceOptions .UseFirstRowAsHeader
ExcelDataSource
.SourceOptions .UseFirstRowAsHeader
DataSourceModel
.SourceOptions .UseFirstRowAsHeader
ExcelDataSourceModel
.SourceOptions .UseFirstRowAsHeader
IExcelDataSourceModel
.SourceOptions .UseFirstRowAsHeader
IChooseFileOptionsPageView
.SourceOptions .UseFirstRowAsHeader
WinForms Controls ChooseFileOptionsPageView
.SourceOptions .UseFirstRowAsHeader
Dashboard DashboardExcelDataSourceBeforeFillEventArgs
.SourceOptions .UseFirstRowAsHeader
ExcelDataSourceBeforeFillEventArgs
.SourceOptions .UseFirstRowAsHeader
.NET Reporting Tools XtraReportModel
.SourceOptions .UseFirstRowAsHeader

Remarks

When the UseFirstRowAsHeader property is set to true, field names for the ExcelDataSource are generated based on the values of the first row. If necessary, you can disable the UseFirstRowAsHeader flag and create a custom schema for the ExcelDataSource using the ExcelDataSource.Schema property.

Note

If you set the UseFirstRowAsHeader property to false and do not provide the data source schema, field names will be generated automatically.

The following code snippets (auto-collected from DevExpress Examples) contain references to the UseFirstRowAsHeader property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also