[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IRange.Formula

Formula Property

Formula

Gets or sets the formula of the cells represented by this IRange in A1-style notation.

Declaration
string Formula { get; set; }
Property Formula As String
Property Value
Type Description
string

The formula.

Examples
worksheet.Range["A1"].Value = 10;
worksheet.Range["A2"].Value = 5;
IRange range = worksheet.Range["B1"];
range.Formula = "=A1+A2";
workbook.Calculate();
object value = range.Value;