officefileapi-devexpress-dot-spreadsheet-dot-export-dot-datatableexportoptions-0e5da6c8.md
Gets or sets whether a cell with an empty value is processed by a converter.
Namespace : DevExpress.Spreadsheet.Export
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
public bool ConvertEmptyCells { get; set; }
Public Property ConvertEmptyCells As Boolean
| Type | Description |
|---|---|
| Boolean |
true , to process cells with empty values; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to ConvertEmptyCells |
|---|---|
| DataTableExporter |
.Options .ConvertEmptyCells
|
Cells with empty values (the CellValue.IsEmpty property is true ) are skipped for better performance. Corresponding values in the target DataTable are left intact.
To run a converter for empty cells, set the ConvertEmptyCells option to true.
If the entire row in the source range does not contain values, and the DataTableExportOptions.ConvertEmptyCells option is set to true , the ConvertEmptyCells setting is ignored.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ConvertEmptyCells 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.
how-to-export-cell-range-to-a-datatable/CS/ExportToDataTableExample/Form1.cs#L109
// Specify exporter options.
exporter.Options.ConvertEmptyCells = true;
exporter.Options.DefaultCellValueToColumnTypeConverter.EmptyCellValue = 0;
how-to-export-cell-range-to-a-datatable/VB/ExportToDataTableExample/Form1.vb#L103
' Specify exporter options.
exporter.Options.ConvertEmptyCells = True
exporter.Options.DefaultCellValueToColumnTypeConverter.EmptyCellValue = 0
myconverter.EmptyCellValue = "N/A"
exporter.Options.ConvertEmptyCells = True
See Also