ExcelSourceOptions.ImportSettings Property
Gets or sets settings used to import data from the Microsoft Excel workbook.
Namespace: DevExpress.DataAccess.Excel
Assembly: DevExpress.DataAccess.v24.2.dll
Declaration
[DefaultValue(null)]
[LocalizableCategory(DataAccessStringId.PropertyGridDataCategoryName)]
public ExcelSettingsBase ImportSettings { get; set; }
Property Value
Type | Default | Description |
---|---|---|
ExcelSettingsBase | null | A ExcelSettingsBase descendant containing settings used to import data from the Microsoft Excel workbook. |
Remarks
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.
- To select all data from the entire worksheet, create the ExcelWorksheetSettings object and specify the worksheet name using the ExcelWorksheetSettings.WorksheetName property. If necessary, you can select the required range of cells using the ExcelWorksheetSettings.CellRange property.
- To select a range of cells specified using the defined name, create the ExcelDefinedNameSettings object and specify the defined name using the ExcelDefinedNameSettings.DefinedName property. If applicable, specify a defined name scope using the ExcelDefinedNameSettings.Scope property.
- To select data from the predefined table, create the ExcelTableSettings object and specify the table name using the ExcelTableSettings.TableName property.
Related GitHub Examples
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.