Back to Devexpress

CellValue.Empty Property

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

latest4.7 KB
Original Source

CellValue.Empty Property

Returns an empty cell value.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public static CellValue Empty { get; }
vb
Public Shared ReadOnly Property Empty As CellValue

Property Value

TypeDescription
CellValue

A CellValue object specifying an empty value of a cell.

|

Remarks

Assign an object returned by the Empty property to the CellRange.Value property to clear cell content.

To ensure that a cell does not contain any data and its value is empty, use the CellValue.IsEmpty property.

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 Empty 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-use-custom-cell-editors/CS/DevAVInvoicing/Form1.cs#L153

csharp
}
    invoice["G12"].Value = CellValue.Empty;
}

spreadsheet-document-api-use-worksheet-table-as-data-source/CS/SpreadsheetDocumentServerAsDataSourceExample/MyPictureProvider.cs#L33

csharp
{
    return CellValue.Empty;
}

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

csharp
if (value == null)
    return DevExpress.Spreadsheet.CellValue.Empty;
if (value is int)

winforms-spreadsheet-use-custom-cell-editors/VB/DevAVInvoicing/Form1.vb#L142

vb
invoice("G12").Value = CellValue.Empty
End Sub

spreadsheet-document-api-use-worksheet-table-as-data-source/VB/SpreadsheetDocumentServerAsDataSourceExample/MyPictureProvider.vb#L28

vb
Public Function TryConvertFromObject(ByVal value As Object) As CellValue Implements IBindingRangeValueConverter.TryConvertFromObject
    Return CellValue.Empty
End Function

how-to-use-excel-add-ins-in-winforms-spreadsheet/VB/SpreadsheetAddIn/Form1.vb#L215

vb
If value Is Nothing Then
    Return CellValue.Empty
End If

See Also

BooleanValue

DateTimeValue

TextValue

NumericValue

ErrorValue

Cell Data Types

CellValue Class

CellValue Members

DevExpress.Spreadsheet Namespace