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.v22.2.dll

NuGet Package: DevExpress.DataAccess

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:

Show 14 property paths
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
Reporting XtraReportModel
.SourceOptions.UseFirstRowAsHeader
Dashboard DashboardDataSourceModel
.SourceOptions.UseFirstRowAsHeader
DashboardExcelDataSource
.SourceOptions.UseFirstRowAsHeader
DashboardExcelDataSourceBeforeFillEventArgs
.SourceOptions.UseFirstRowAsHeader
ExcelDataSourceBeforeFillWebEventArgs
.SourceOptions.UseFirstRowAsHeader
ExcelDataSourceBeforeFillEventArgs
.SourceOptions.UseFirstRowAsHeader
ExcelDataSourceBeforeFillEventArgs
.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