Page tree
Skip to end of metadata
Go to start of metadata

Description

The DataImportProperties contains a set of properties that can be used when importing data into a Worksheet or Area. To return a DataImportProperties object, call Workbook.CreateDataImportProperties.

C#
vb.net

Examples

C#
vb.net

Fields

Name

Description

ALLCOLUMNS

255

ALLROWS

65536

Properties

Name

Description

ColumnIndexFilter

Use ColumnIndexFilter to select specific columns within the imported data. Only the specified columns will be imported to the worksheet.

ColumnNameFilter

Use ColumnNameFilter to select specific columns within the imported data. Only the specified columns will be imported to the worksheet.

IgnoreNulls

Sets or returns whether NULL values in the imported dataset be ignored or converted to blank cells.

If this is set to true, then existing values and formulas will preserved in cells, if this set to {{false}}existing data in cells will be replaced with blank cells which will clear existing formulas or cell values.

MaxColumns

Sets or returns the maximum number of columns to import from the data source.

MaxRows

Sets or returns the maximum number of rows to import from the data source.

Transpose

When data is imported from a two-dimensional or rectangular array, the first dimension of the array corresponds to row and the second to column.

Truncate

Sets whether ExcelWriter should truncate imported data rows and columns that do not fit within the target rows and columns in the spreadsheet. If Truncate is not enabled, an exception will be thrown if the number of rows or columns imported exceeds the number of target rows or columns in the spreadsheet.

TruncateColumns

Sets or returns whether imported data columns will be truncated if the number of columns imported exceeds the number of target columns in the spreadsheet.

TruncateRows

Sets or returns whether imported data rows will be truncated if the number of rows imported exceeds the number of target rows in the spreadsheet.

UseColumnNames

Sets or returns whether to import column names to the first row (or first column if Transpose is set to true ) of the imported data's target cells.

ConvertStrings

Sets or returns whether to convert numeric strings such as currencies and formatted numerals in the imported data to numbers by using the culture information specified through the ConversionCulture property. By default it is set to false.

ConversionCulture

Gets or sets the culture information to be used to convert the numeric strings such as currencies and formatted numerals in the imported data to numbers. By default it is set to System.Globalization.CultureInfo.InvariantCulture. This property setting will take effect only if the ConvertStrings property is set to true.

  • No labels