Back to Devexpress

CellValue.IsEmpty Property

officefileapi-devexpress-dot-spreadsheet-dot-cellvalue.md

latest5.2 KB
Original Source

CellValue.IsEmpty Property

Gets whether the cell is empty.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public bool IsEmpty { get; }
vb
Public ReadOnly Property IsEmpty As Boolean

Property Value

TypeDescription
Boolean

true , if the cell is empty; otherwise, false

|

Remarks

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

csharp
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

csharp
ConversionResult converted = ConversionResult.Success;
if (cellValue.IsEmpty) {
    result = EmptyCellValue;

how-to-use-excel-add-ins-in-winforms-spreadsheet/CS/SpreadsheetAddIn/Form1.cs#L154

csharp
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

vb
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))

spreadsheet-document-api-export-worksheet-range-to-datatable/VB/ExportToDataTableWorkbookExample/MyConverter.vb#L16

vb
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

vb
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

vb
Dim value As DevExpress.Spreadsheet.CellValue = parameter(i, j)
If value.IsEmpty Then
    result(i + 1, j + 1) = Nothing

See Also

IsBoolean

IsText

IsNumeric

IsDateTime

IsError

Type

CellValue Class

CellValue Members

DevExpress.Spreadsheet Namespace