Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / Cell Class / Formula Property


In This Topic
    Formula Property
    In This Topic

    Gets or sets the Cell's formula.

    Syntax
    'Declaration
     
    
    Public Property Formula As String
    'Usage
     
    
    Dim instance As Cell
    Dim value As String
     
    instance.Formula = value
     
    value = instance.Formula
    public string Formula {get; set;}
    Remarks

    A formula always starts with the equal sign (“=”) and uses comma (“,”) as parameter separators; for example: “=SUM(A1, A2, A4)”.

    A formula can include constant (“=A1 + 5*4%”), references (“=A1*A3”), ranges of references (“=SUM(A1:A3, B1:B3)”) or functions (“=SUM(A1:A3) + AVERAGE(B1:B3)”).

    Note that each function have their own characteristics and that you should refer to their specific pages for more information.

    The formula will be calculated once the Workbook is opened with MS Excel and the Value property will be updated once the Workbook is saved with MS Excel.

    The formula can also be calculated by using Worksheet.CalculateFormulas() since this call will automatically set the Value property.

    The default value is null, which means that the Cell will not contain a formula.

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also