officefileapi-devexpress-dot-spreadsheet-dot-cellvalue-0ef0af90.md
Returns a string contained in a cell.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
public string TextValue { get; }
Public ReadOnly Property TextValue As String
| Type | Description |
|---|---|
| String |
A String value specifying the text value of a cell.
|
Use the TextValue property to obtain the text value contained in a cell. To check whether the cell value is of the text type, use the CellValue.IsText or CellValue.Type property. If a cell value type is other than text, the TextValue property returns null (Nothing in VB). To get a string that specifies a cell value of any type as it is displayed in the cell, use the Cell.DisplayText 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 TextValue 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.
Weather w;
if (Enum.TryParse(value.TextValue, out w)) return w;
return Weather.Undefined;
winforms-spreadsheet-use-custom-cell-editors/CS/DevAVInvoicing/Form1.cs#L141
// to display stores owned by the customer with the specified ID.
string customerId = invoice["B11"].Value.TextValue;
Table storesTable = customerStores.Tables[0];
Weather w;
if (Enum.TryParse(value.TextValue, out w)) return w;
return Weather.Undefined;
spreadsheet-document-api-data-binding/CS/SpreadsheetApiDataBinding/MyConverter.cs#L21
Weather w;
if (Enum.TryParse(value.TextValue, out w)) return w;
return Weather.Undefined;
dataSet.Suppliers.AddSuppliersRow(
sheet["C4"].Value.TextValue, sheet["C6"].Value.TextValue, sheet["C8"].Value.TextValue,
sheet["E4"].Value.TextValue, sheet["E6"].Value.TextValue, sheet["E8"].Value.TextValue,
Dim w As Weather = Nothing
If System.Enum.TryParse(value.TextValue, w) Then
Return w
winforms-spreadsheet-use-custom-cell-editors/VB/DevAVInvoicing/Form1.vb#L129
' to display stores owned by the customer with the specified ID.
Dim customerId As String = invoice("B11").Value.TextValue
Dim storesTable As Table = customerStores.Tables(0)
Dim w As Weather = Nothing
If System.Enum.TryParse(value.TextValue, w) Then
Return w
spreadsheet-document-api-data-binding/VB/SpreadsheetApiDataBinding/MyConverter.vb#L16
Dim w As Weather = Nothing
If System.Enum.TryParse(value.TextValue, w) Then
Return w
Dim pic As DXImage = Nothing
If pictures.TryGetValue(value.TextValue, pic) Then
Return pic
See Also