Back to Devexpress

CellRange.HasFormula Property

officefileapi-devexpress-dot-spreadsheet-dot-cellrange-589e0ec6.md

latest2.6 KB
Original Source

CellRange.HasFormula Property

Determines whether all cells in the range contain a formula.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool HasFormula { get; }
vb
ReadOnly Property HasFormula As Boolean

Property Value

TypeDescription
Boolean

true , if all cells in the range contain a formula; otherwise, false.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the HasFormula 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))
{

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

See Also

Formulas in Spreadsheet Documents

CellRange Interface

CellRange Members

DevExpress.Spreadsheet Namespace