officefileapi-devexpress-dot-spreadsheet-dot-cellvalue-97683d11.md
Gets whether the cell contains text.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
public bool IsText { get; }
Public ReadOnly Property IsText As Boolean
| Type | Description |
|---|---|
| Boolean |
true , if the cell value is of the text type; otherwise, false
|
To get the text string contained in a cell, use the CellValue.TextValue 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 IsText 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))
{
CellValue value = range[0, offset].Value;
if (value.IsText) return typeof(string);
if (value.IsBoolean) return typeof(bool);
winforms-spreadsheet-use-cell-range-as-data-source/CS/RangeDataSource/MyColumnDetector.cs#L21
CellValue value = range[0, offset].Value;
if (value.IsText) return typeof(string);
if (value.IsBoolean) return typeof(bool);
winforms-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_API_Part02/Utils.cs#L14
{
if (!a.IsText || !b.IsText) return 0;
if (a.TextValue.Length == b.TextValue.Length) return 0;
wpf-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_WPF_API_Part02/Utils.cs#L14
{
if (!a.IsText || !b.IsText) return 0;
if (a.TextValue.Length == b.TextValue.Length) return 0;
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 value As CellValue = range(0, offset).Value
If value.IsText Then
Return GetType(String)
winforms-spreadsheet-use-cell-range-as-data-source/VB/RangeDataSource/MyColumnDetector.vb#L19
Dim value As CellValue = range(0, offset).Value
If value.IsText Then Return GetType(String)
If value.IsBoolean Then Return GetType(Boolean)
winforms-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_API_Part02/Utils.vb#L13
Public Function Compare(ByVal a As DevExpress.Spreadsheet.CellValue, ByVal b As DevExpress.Spreadsheet.CellValue) As Integer Implements IComparer(Of DevExpress.Spreadsheet.CellValue).Compare
If (Not a.IsText) OrElse (Not b.IsText) Then
Return 0
wpf-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_WPF_API_Part02/Utils.vb#L12
Public Function Compare(ByVal a As DevExpress.Spreadsheet.CellValue, ByVal b As DevExpress.Spreadsheet.CellValue) As Integer Implements IComparer(Of DevExpress.Spreadsheet.CellValue).Compare
If (Not a.IsText) OrElse (Not b.IsText) Then
Return 0
See Also