menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FormulaRecord - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FormulaRecord

    Contains the token array and the result of a formula cell.

    Inheritance
    System.Object
    Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw
    CellPositionBase
    FormulaRecord
    Implements
    IBiffStorage
    ICellPositionFormat
    System.ICloneable
    IDoubleValue
    IFormulaRecord
    Inherited Members
    CellPositionBase.Column
    CellPositionBase.ExtendedFormatIndex
    CellPositionBase.m_iColumn
    CellPositionBase.m_iRow
    CellPositionBase.m_usExtendedFormat
    CellPositionBase.ParseStructure(DataProvider, Int32, Int32, ExcelVersion)
    CellPositionBase.Row
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.XlsIO.Parser.Biff_Records
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    [Biff(TBIFFRecord.Formula)]
    [CLSCompliant(false)]
    public class FormulaRecord : CellPositionBase, IBiffStorage, ICellPositionFormat, ICloneable, IDoubleValue, IFormulaRecord

    Constructors

    FormulaRecord()

    Default constructor

    Declaration
    public FormulaRecord()

    Fields

    DEF_BLANK_MASK

    Represents error mask.

    Declaration
    public const ulong DEF_BLANK_MASK = 18446462598732840963UL
    Field Value
    Type
    System.UInt64

    DEF_BLANK_VALUE_LONG

    Declaration
    public static readonly long DEF_BLANK_VALUE_LONG
    Field Value
    Type
    System.Int64

    DEF_BOOL_MASK

    Represents boolean mask.

    Declaration
    public const ulong DEF_BOOL_MASK = 18446462598732840961UL
    Field Value
    Type
    System.UInt64

    DEF_ERROR_MASK

    Represents error mask.

    Declaration
    public const ulong DEF_ERROR_MASK = 18446462598732840962UL
    Field Value
    Type
    System.UInt64

    DEF_FIRST_MASK

    Represents first mask

    Declaration
    public const ulong DEF_FIRST_MASK = 18446462598732841215UL
    Field Value
    Type
    System.UInt64

    DEF_STRING_MASK

    String mask.

    Declaration
    public const ulong DEF_STRING_MASK = 18446462598732840960UL
    Field Value
    Type
    System.UInt64

    DEF_STRING_MASK_VALUE

    String mask.

    Declaration
    public const ulong DEF_STRING_MASK_VALUE = 18446470295314235392UL
    Field Value
    Type
    System.UInt64

    DEF_STRING_VALUE

    Declaration
    public static readonly double DEF_STRING_VALUE
    Field Value
    Type
    System.Double

    DEF_STRING_VALUE_LONG

    Declaration
    public static readonly long DEF_STRING_VALUE_LONG
    Field Value
    Type
    System.Int64

    Properties

    BooleanValue

    The calculated boolean value of the formula.

    Declaration
    public bool BooleanValue { get; set; }
    Property Value
    Type
    System.Boolean

    CalculateOnOpen

    True to calculate on open.

    Declaration
    public bool CalculateOnOpen { get; set; }
    Property Value
    Type
    System.Boolean

    DoubleValue

    The calculated value of the formula.

    Declaration
    public double DoubleValue { get; }
    Property Value
    Type
    System.Double

    ErrorValue

    The calculated error value of the formula.

    Declaration
    public byte ErrorValue { get; set; }
    Property Value
    Type
    System.Byte

    Formula

    Array that contains all parsed tokens.

    Declaration
    public Ptg[] Formula { get; set; }
    Property Value
    Type
    Ptg[]

    HasString

    Declaration
    public bool HasString { get; set; }
    Property Value
    Type
    System.Boolean

    IsBlank

    Gets if the formula record is blank

    Declaration
    public bool IsBlank { get; }
    Property Value
    Type
    System.Boolean

    IsBool

    Indicates if formula record contain bool value. Read-only.

    Declaration
    public bool IsBool { get; }
    Property Value
    Type
    System.Boolean

    IsError

    Indicates if formula record contain error value. Read-only.

    Declaration
    public bool IsError { get; }
    Property Value
    Type
    System.Boolean

    IsFillFromExpression

    Declaration
    public bool IsFillFromExpression { get; set; }
    Property Value
    Type
    System.Boolean

    MinimumRecordSize

    Read-only. Returns minimum possible size of record's internal data array.

    Declaration
    public override int MinimumRecordSize { get; }
    Property Value
    Type
    System.Int32
    Overrides
    Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw.MinimumRecordSize

    Options

    Option flags of the formula.

    Declaration
    public ushort Options { get; set; }
    Property Value
    Type
    System.UInt16

    ParsedExpression

    Array that contains all parsed tokens.

    Declaration
    public Ptg[] ParsedExpression { get; set; }
    Property Value
    Type
    Ptg[]

    PartOfSharedFormula

    True if part of a shared formula.

    Declaration
    public bool PartOfSharedFormula { get; set; }
    Property Value
    Type
    System.Boolean

    RecalculateAlways

    True to always recalculate.

    Declaration
    public bool RecalculateAlways { get; set; }
    Property Value
    Type
    System.Boolean

    Reserved

    Read-only. Reserved.

    Declaration
    public int Reserved { get; }
    Property Value
    Type
    System.Int32

    Value

    The calculated value of the formula.

    Declaration
    public double Value { get; set; }
    Property Value
    Type
    System.Double

    Methods

    Clone()

    Declaration
    public object Clone()
    Returns
    Type
    System.Object

    ConvertFormulaTokens(Ptg[], Boolean)

    Converts formula tokens from Excel97to2003 to Excel2007 version and vice versa.

    Declaration
    public static void ConvertFormulaTokens(Ptg[] tokens, bool bFromExcel07To97)
    Parameters
    Type Name Description
    Ptg[] tokens

    Formula tokens.

    System.Boolean bFromExcel07To97

    Defines what conversion must be applied.

    GetBoolErrorValue(Byte, Boolean)

    Converts error or bool value to formula double value.

    Declaration
    public static double GetBoolErrorValue(byte value, bool bIsError)
    Parameters
    Type Name Description
    System.Byte value

    Represents error or bool value.

    System.Boolean bIsError

    Indicates is error or bool.

    Returns
    Type Description
    System.Double

    Returns formula value.

    GetStoreSize(ExcelVersion)

    Size of the required storage space. Read-only.

    Declaration
    public override int GetStoreSize(ExcelVersion version)
    Parameters
    Type Name Description
    ExcelVersion version
    Returns
    Type
    System.Int32
    Overrides
    CellPositionBase.GetStoreSize(ExcelVersion)

    InfillCellData(DataProvider, Int32, ExcelVersion)

    In this method, class must pack all of its properties into an internal data array, m_data. This method is called by FillStream, when the record must be serialized into a stream.

    Declaration
    protected override void InfillCellData(DataProvider provider, int iOffset, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Object that provides access to the data.

    System.Int32 iOffset

    Offset to the record's data.

    ExcelVersion version

    Excel version used to fill data.

    Overrides
    CellPositionBase.InfillCellData(DataProvider, Int32, ExcelVersion)

    ParseCellData(DataProvider, Int32, ExcelVersion)

    Parse structure of record. Convert Data buffer to special values according to record specification.

    Declaration
    protected override void ParseCellData(DataProvider provider, int iOffset, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Object that provides access to the data.

    System.Int32 iOffset

    Offset to the record's data.

    ExcelVersion version

    Excel version used to fill data.

    Overrides
    CellPositionBase.ParseCellData(DataProvider, Int32, ExcelVersion)

    ReadDoubleValue(DataProvider, Int32, ExcelVersion)

    Reads record's value from the data provider.

    Declaration
    public static double ReadDoubleValue(DataProvider provider, int recordStart, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Provider to read data from.

    System.Int32 recordStart

    Offset to the record's start.

    ExcelVersion version

    Excel version used to infill data.

    Returns
    Type Description
    System.Double

    Record's value.

    ReadInt64Value(DataProvider, Int32, ExcelVersion)

    Reads record's value from the data provider.

    Declaration
    public static long ReadInt64Value(DataProvider provider, int recordStart, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Provider to read data from.

    System.Int32 recordStart

    Offset to the record's start.

    ExcelVersion version

    Excel version used to infill data.

    Returns
    Type Description
    System.Int64

    Record's value.

    ReadValue(DataProvider, Int32, ExcelVersion)

    Reads record's value from the data provider.

    Declaration
    public static Ptg[] ReadValue(DataProvider provider, int recordStart, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider provider

    Provider to read data from.

    System.Int32 recordStart

    Offset to the record's start.

    ExcelVersion version

    Excel version used to infill data.

    Returns
    Type Description
    Ptg[]

    Record's value.

    SetBlankValue(DataProvider, Int32, ExcelVersion)

    Sets flags so MS Excel understands that formula returns string.

    Declaration
    public static void SetBlankValue(DataProvider dataProvider, int iFormulaOffset, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider dataProvider

    Object that provides access to the data.

    System.Int32 iFormulaOffset

    Offset to the FormulaRecord..

    ExcelVersion version

    SetStringValue(DataProvider, Int32, ExcelVersion)

    Sets flags so MS Excel understands that formula returns string.

    Declaration
    public static void SetStringValue(DataProvider dataProvider, int iFormulaOffset, ExcelVersion version)
    Parameters
    Type Name Description
    DataProvider dataProvider

    Object that provides access to the data.

    System.Int32 iFormulaOffset

    Offset to the FormulaRecord..

    ExcelVersion version

    UpdateOptions(DataProvider, Int32)

    Declaration
    public static void UpdateOptions(DataProvider provider, int iOffset)
    Parameters
    Type Name Description
    DataProvider provider
    System.Int32 iOffset

    WriteDoubleValue(DataProvider, Int32, ExcelVersion, Double)

    Writes record's value into the data provider.

    Declaration
    public static void WriteDoubleValue(DataProvider provider, int recordStart, ExcelVersion version, double value)
    Parameters
    Type Name Description
    DataProvider provider

    Provider to write data into.

    System.Int32 recordStart

    Offset to the record's start.

    ExcelVersion version

    Excel version used to infill data.

    System.Double value

    Record's value.

    Implements

    IBiffStorage
    ICellPositionFormat
    System.ICloneable
    IDoubleValue
    IFormulaRecord
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved