alexa
menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class FormulaParsingEventArgs

    Used by the FormulaParsing event, FormulaParsingEventArgs holds a reference to the string that is to be parsed. The FormulaParsing event allows the listener to preprocess the string that is being parsed.

    Inheritance
    object
    EventArgs
    FormulaParsingEventArgs
    Inherited Members
    EventArgs.Empty
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.XlsIO.Calculate
    Assembly: Syncfusion.XlsIO.NET.dll
    Syntax
    public class FormulaParsingEventArgs : EventArgs
    Remarks

    Please note that this event may be raised more than once as a string is parsed.

    Examples

    Here is code snippets that show how to tell a engine to also treat any text in a formula cell that begins with a minus(-) or a plus(+) as formulas. The default behavior is to treat only text beginning with equal(=) as formulas.

            <pre><code class="lang-csharp">//subscribe to the event before any formulas are loaded into the grid...
    

    Engine.FormulaParsing += new FormulaParsingEventHandler(Engine_FormulaParsing);

    //Here is the handler code that adds an = if necessary so any string beginning with +, - or = //is treated as a formula. void Engine_FormulaParsing(object sender, FormulaParsingEventArgs e) { //allow cells starting with + and - to be treated as formula cells. if (e.Text.StartsWith("-")) e.Text = "=" + e.Text; else if (e.Text.StartsWith("+")) e.Text = "=" + e.Text.Substring(1); }

    Constructors

    FormulaParsingEventArgs()

    Default constructor.

    Declaration
    public FormulaParsingEventArgs()

    FormulaParsingEventArgs(string)

    Holds a reference to the string that is to be parsed..

    Declaration
    public FormulaParsingEventArgs(string text)
    Parameters
    Type Name Description
    string text

    The formula that is to be parsed.

    Properties

    Text

    A property that gets/sets the formula about to be parsed.

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    string
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved