officefileapi-devexpress-dot-spreadsheet-dot-cellvalue.md
Gets whether the cell is empty.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
public bool IsEmpty { get; }
Public ReadOnly Property IsEmpty As Boolean
| Type | Description |
|---|---|
| Boolean |
true , if the cell is empty; otherwise, false
|
You can also use the CellValue.Type property to obtain the cell value type. This property returns CellValueType.None, if a cell does not contain any data.
For more information on cell values, refer to the Cell Data Types document.
The following code snippets (auto-collected from DevExpress Examples) contain references to the IsEmpty 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.
winforms-spreadsheet-how-to-edit-rich-text/CS/SpreadsheetRichText/Form1.cs#L46
Cell activeCell = spreadsheetControl.ActiveCell;
if (activeCell.Value.IsEmpty || (!activeCell.HasFormula && activeCell.Value.IsText))
{
how-to-export-cell-range-to-a-datatable/CS/ExportToDataTableExample/Form1.cs#L162
ConversionResult converted = ConversionResult.Success;
if (cellValue.IsEmpty) {
result = EmptyCellValue;
how-to-use-excel-add-ins-in-winforms-spreadsheet/CS/SpreadsheetAddIn/Form1.cs#L154
DevExpress.Spreadsheet.CellValue value = parameter[i, j];
if (value.IsEmpty)
result[i + 1, j + 1] = null;
winforms-spreadsheet-how-to-edit-rich-text/VB/SpreadsheetRichText/Form1.vb#L40
Dim activeCell As Cell = spreadsheetControl.ActiveCell
If activeCell.Value.IsEmpty OrElse (Not activeCell.HasFormula AndAlso activeCell.Value.IsText) Then
Dim setRichTextItem As New SpreadsheetMenuItem("Set Rich Text", New EventHandler(AddressOf SetRichTextItemClick))
Dim converted As ConversionResult = ConversionResult.Success
If cellValue.IsEmpty Then
result = EmptyCellValue
how-to-export-cell-range-to-a-datatable/VB/ExportToDataTableExample/Form1.vb#L151
Dim converted As ConversionResult = ConversionResult.Success
If cellValue.IsEmpty Then
result = EmptyCellValue
how-to-use-excel-add-ins-in-winforms-spreadsheet/VB/SpreadsheetAddIn/Form1.vb#L166
Dim value As DevExpress.Spreadsheet.CellValue = parameter(i, j)
If value.IsEmpty Then
result(i + 1, j + 1) = Nothing
See Also