[]
Represents options that control how data is imported into a range.
Use this class with ImportData(DataTable, DataImportOptions) to configure behaviors such as how insufficient space is handled, whether column headers are included, which columns are imported, and how the item type is resolved for auto-generated columns.
public class DataImportOptions
Public Class DataImportOptions
Dictionary<string, object> item = new Dictionary<string, object>
{
["Name"] = "Alice",
["City"] = "Seattle"
};
Dictionary<string, object>[] items = new[] { item };
DataImportOptions options = new DataImportOptions();
worksheet.Range["A1"].ImportData(items, options);
| Name | Description |
|---|---|
| DataImportOptions() |
| Name | Description |
|---|---|
| ColumnsSelector | Selects columns to import. The default behavior is to auto-generate all columns. |
| IncludeColumnsHeader | Determines whether to include column header as the first row when importing data. |
| InsufficientSpaceHandling | Determines how to handle insufficient space when importing data. |
| ItemTypeProvider | Gets item type from the specified IEnumerable. The type is used to generate columns. The default behavior is to try to get the item type from the generic parameter of IEnumerable<T>, then try to get type from the first item of the IEnumerable. |