Back to Devexpress

CellValue.IsBoolean Property

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

latest4.3 KB
Original Source

CellValue.IsBoolean Property

Gets whether the cell contains a Boolean value.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

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

Property Value

TypeDescription
Boolean

true , if the cell value is of the Boolean type; otherwise, false

|

Remarks

You can also use the CellValue.Type property to obtain the cell value type. This property returns CellValueType.Boolean, if a cell value is Boolean.

To get the boolean value contained in a cell, use the CellValue.BooleanValue 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 IsBoolean 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.

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

csharp
if (value.IsText) return typeof(string);
if (value.IsBoolean) return typeof(bool);
if (value.IsDateTime) return typeof(DateTime);

winforms-spreadsheet-use-cell-range-as-data-source/CS/RangeDataSource/MyColumnDetector.cs#L22

csharp
if (value.IsText) return typeof(string);
if (value.IsBoolean) return typeof(bool);
if (value.IsDateTime) return typeof(DateTime);

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

vb
End If
If value.IsBoolean Then
    Return GetType(Boolean)

winforms-spreadsheet-use-cell-range-as-data-source/VB/RangeDataSource/MyColumnDetector.vb#L20

vb
If value.IsText Then Return GetType(String)
If value.IsBoolean Then Return GetType(Boolean)
If value.IsDateTime Then Return GetType(Date)

See Also

IsEmpty

IsText

IsNumeric

IsDateTime

IsError

Type

CellValue Class

CellValue Members

DevExpress.Spreadsheet Namespace