corelibraries-devexpress-dot-dataaccess-dot-excel-dot-excelsourceoptions.md
Gets or sets settings used to import data from the Microsoft Excel workbook.
Namespace : DevExpress.DataAccess.Excel
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
[DefaultValue(null)]
[LocalizableCategory(DataAccessStringId.PropertyGridDataCategoryName)]
public ExcelSettingsBase ImportSettings { get; set; }
<DefaultValue(Nothing)>
<LocalizableCategory(DataAccessStringId.PropertyGridDataCategoryName)>
Public Property ImportSettings As ExcelSettingsBase
| Type | Default | Description |
|---|---|---|
| ExcelSettingsBase | null |
A ExcelSettingsBase descendant containing settings used to import data from the Microsoft Excel workbook.
|
The ImportSettings property exposed by the ExcelSourceOptions class allows you to specify the approach used to import data from a workbook. For instance, you can select all data from the specified worksheet or specify the required cell range. To import data from the workbook, create the required ExcelSettingsBase object descendant and specify its settings.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ImportSettings 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.
ExcelSourceOptions excelSourceOptions = new ExcelSourceOptions();
excelSourceOptions.ImportSettings = excelWorksheetSettings;
excelSourceOptions.SkipHiddenRows = false;
data-access-library-create-data-sources-at-runtime/CS/ExcelDataSourceSnippets/Code.cs#L37
ExcelSourceOptions excelSourceOptions = new ExcelSourceOptions();
excelSourceOptions.ImportSettings = excelWorksheetSettings;
excelSourceOptions.SkipHiddenRows = false;
Dim excelSourceOptions As ExcelSourceOptions = New ExcelSourceOptions()
excelSourceOptions.ImportSettings = excelWorksheetSettings
excelSourceOptions.SkipHiddenRows = False
reporting-winforms-bind-excel-runtime/VB/BindingReportToExcelWorkbook/Form1.vb#L28
Dim excelSourceOptions As ExcelSourceOptions = New ExcelSourceOptions()
excelSourceOptions.ImportSettings = excelWorksheetSettings
excelSourceOptions.SkipHiddenRows = False
winforms-dashboard-bind-pie-item-to-data-in-code/VB/Dashboard_CreatePies/Form1.vb#L27
importSettings.CellRange = "A1:L100"
options.ImportSettings = importSettings
excelDataSource.SourceOptions = options
data-access-library-create-data-sources-at-runtime/VB/ExcelDataSourceSnippets/Code.vb#L35
Dim excelSourceOptions As New ExcelSourceOptions()
excelSourceOptions.ImportSettings = excelWorksheetSettings
excelSourceOptions.SkipHiddenRows = False
See Also