Syncfusion.Calculate.Base
Performs the parsing operation of Array formulas.
To check the index of "_" in a string(formula).
The operators which are involved in array formula. If these operators are not
present in formula, then formula must be returned without parsing.
Delegate defined to access the method GetArrayRecordPosition for
getting position of the cell.
Row index of the cell.
Column index of the cell.
The height required for the selected range.
The width required for the selected range.
The method containing the four integer parameters.
Length in each splitted range of array formula.
Gets or sets the ArrayRecordPostion method from XlsIO side to get the position
of the cell in the array.
Initialize the object for parsing operations.
An instance of .
Gets or sets the instance of .
To split the strings based on the pattern involving operators(-,+,*,/,&).
For example:"A1:B1 * C1:D1" will be splitted as "A1:B1" and "C1:D1" which will
be stored separately in string array.
The string to be splitted into string array.
String array.
To calculate the height and width of the passed argument. Based on the argument's type of
cell reference or constants, they are calculated separately and if any of the width/height is less than
max height/width, correspondingly range is increased/decreased for range.The minimum width/height is
maintained.
A string passed to compute maximum height/width.
The height determined for array.
The width determined for array.
The minimum height.
The minimum width.
The string with altered height/width.
Resize range based on the max height and max width of the array and stored in a list
which needs to be parsed. For example: "A1:B3*C1:C2" will be resized based on the
height of "2"(value of smaller row count but not 1) and width of "2"(Value of smaller column count but not 1).
The arguments splitted from GetCellsFromArgs method, will be of the mentioned length of 4. Hence "A1:B3" will be
splitted and be first argument in the list and "C1:C2" will be splitted as the next argument in the list.
This list will be passed for making expressions in Parse method as "A1*C1,B1*C1,A2*C2,B2*C2".
The formula array which needs to be adjusted and parsed.
The parsed formula string in original format.
The string array.
A method that splits the formula based on the operators.
For example: if the argument is passed as "(A1:B2+C1:D2)" which will be parsed
as "A1+C1,B1+D1,A2+C2,B2+D2".
The formula passed in with operator.
The parsed formula string in original format.
Splitted formula based on logic.
A method that parses the array formula and return it as normal formula for computation.
For example if the formula is passed as "{=SUM(A1:B1*C1:D1)}", then it will be parsed
and returned as SUM(A1*C1,B1*D1).
The array formula to be parsed.
The normal formula for parsing in CalcEngine.
A method that invokes for computation of LEN,ROW,COLUMN methods in array formula.
For example if the formula SUM(ROW(A1:A5)) then it should be parsed as SUM({1,2,3,4,5})(excel behavior)
and if the formula is ROW(A1:A5), based on the required cell, the corresponding row index is returned.
The formula's argument.
The formula name.
The computation level of the formula.
A string which holds the computed value with curly braces.
The function to check if the given formula is multi cell array or not.
For example: if the formula is "{A1:B1 * C1:D1}", then it is a multi cell array
whereas, if the formula is "SUM(A1:B1*C1:D1), then it is not a multi cell array.
The formula which is passed to check.
True; if it is multicell array;else False.
To parse the multi cell array, that is to get the positon of the array record and returning
the particular formula for the given cell.
For example: if the parsed formula is "A1*C1,B1*D1,A2*C2,B2*D2",then based on the given cell if
the index is 2, then resultant formula is "B1*D1" whereas if the index is "-1", then error
messages is returned.
formula to be parsed.
The parsed formula string in original format.
Formula required for given cell.
Parsing the one/multi dimensional array constants in formula. For Eg: parsing of
{1,2,3} or {1;2;3} or {1,2;3,4}. It also parses the multi dimensional array with constants
such as {1,2}*{3,4}.
Formula to be parsed.
The formula/value which needs to be displayed.
If passed formula contains operators involving expressions with commas, then it will
be parsed by splitting the arg's based on comma and storing in the list. For eg: if the
passed argument is "{1*2,3*4,4*5}, then based on the cell's index, particular expression
will be returned
The formula for parsing.
The height of the arg.
The width of the arg.
Expression/Value based on the formula.
For parsing the horizontal arrays. (i.e) the formula which is separated by
commas, for eg: {1,2,3}.
Formula to be parsed.
The value based on position of cell.
For parsing the vertical arrays. (i.e) the formula which is separated by
semi colon, for eg: {1;2;3}.
Formula to be parsed.
The value based on position of cell.
Getting the height in which the array formula will arrange the values of selected range.
Smaller height of the given expression should be preferred but if the smaller value is 1, then the
height of another expression should be considered.
For example:"A1:B3*C1:D2" in which, the smaller height 2 will be considered and returned.
Splitted strings from original formula.
The height required for array formula.
Getting the width in which the array formula will arrange the values of selected range.
Smaller width of the given expression should be preferred but if the smaller value is 1, then the
width of another expression should be considered.
For example:"A1:B3*C1:E2" in which, the smaller width is 2 will be considered and returned.
Splitted strings from original formula.
The width required for array formula.
To get the position of the cell in the array formula applied range.
if the cell like "A5" is passed with height and width, then it finds the exact
postion in the selected range "A4:D7" from XlsIO side and returns it.
The height of the array record.
The width of the array record
The position of the cell.
To Compute the length of the given argument, based on the computational level.
For example if the formula SUM(LEN(A1:A3)), the computation level is greater than 1,
hence it should be parsed as SUM({LEN(A1),LEN(A2),LEN(A3)})(excel behavior)
and if the formula is LEN(A1:A3), the computation level is 1, then
the corresponding length of the cell is returned.
Passed argument for computation.
Computational level.
Computed result.
To Compute the row index of the given argument, based on the computational level.
For example if the formula SUM(ROW(A1:A3)), the computation level is greater than 1,
hence it should be parsed as SUM({ROW(A1),ROW(A2),ROW(A3)})(excel behavior)
and if the formula is ROW(A1:A3), the computation level is 1, then
the corresponding row index of the cell is returned.
Passed argument for computation.
Computational level.
Computed result.
To Compute the column index of the given argument, based on the computational level.
For example if the formula SUM(COLUMN(A1:C1)), the computation level is greater than 1,
hence it should be parsed as SUM({COLUMN(A1),COLUMN(B1),COLUMN(C1)})(excel behavior)
and if the formula is COLUMN(A1:C3), the computation level is 1, then
the corresponding column index of the cell is returned.
Passed argument for computation.
Computational level.
Computed result.
To compute the IF fomrula based on the computation level.
If the computation level is greater than zero and the formula is "IF(G3:G30="",0,1) get the value and perform logical test for each cell and return the array structure value(“1,1,1,1,1,1,0,0,0,1”).
Passed argument for computation.
Computational level.
Computed result.
To compute the IF fomrula based on the computation level.
CellRange
Tokens("=",">",">=")
The criteria used to determine which cells to add.
the parsed criteria is number is set as true.otherwise false.
Computational level.
The length of parsed range.
Computed result.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
CalculateConfig serves as a Configuration class for the calculate library. In the current version, there are no explicit settings.
Adding this component from the tool box allows you to easily configure your project for calculate support.
Constructor function
Copyright notice for the library.
FormulaInfo maintains information on a single formula object.
A property that gets/sets the text of the initial formula.
A property that gets/sets the last computed value of this formula.
A property that gets/sets the formula as a parsed string.
CalcEngine encapsulates the code required to parse and compute formulas. Hashtable
properties maintain a Formula Library of functions as well as a list
of dependent cells.
You can add and remove library functions.
Field that turns on/off processing of the ICalcData.ValueChanged event.
Used to store the value as double
Used to store the value as double
Used to store the value as double
Used to store the number
Used to store the big number as double
Used to store the value as double
used to calculate the row in Table.
used to calculate the header in Table.
used to calculate the total in Table.
used to calculate the data in Table
used to calculate all in Table
This field holds equivalent double value of 1904(DateTime).
This field will be set as true, if the 1904 date system is enabled in Excel.
Set the boolean as true
The constructor.
The constructor.
The ICalcData from the underlying grid.
Delegate used to define functions that you add to the function library.
Resultant value.
Occurs whenever a string needs to be tested to determine whether it should be treated as a formula string and parsed,
or be treated as a non-formula string. This event allows for preprocessing the unparsed formula.
This event may be raised more than once in the processing of a string into a formula.
Occurs whenever an unknown function is encountered during the parsing of a formula.
This event may be raised more than once in the parsing of a formula.
Occurs whenever an UpdateNamedRange function is encountered during the parsing of a formula.
This event may be raised more than once in the parsing of a formula.
Occurs when the formula computes the values.
This event may be raised more than once in the computation of a formula.
Gets or sets whether the formula is array formula or not.
Gets or sets the instance of .
Gets or sets the instance of
Gets of sets whether the CalcEngine treats nonempty strings as zeros when they are
encountered during calculations.
The default value is true meaning that if a nonempty string is encountered during an arithmetic operation, it will be treated as zero.
Gets or sets a value indicating whether the current context is for a conditional format.
Gets or sets a value indicating whether the current execution is from the Blazor platform.
This property is used to return the cell ranges for print area calculation.
Specifies the maximum number of recursive calls that can be used to compute a cellvalue.
This property comes into play when you have a calculated formula cell that depends on
another calculated formula that depends on another calculated formula and so on. If the number of
'depends on another formula' exceeds MaximumRecursiveCalls, you will see a Too Complex message
displayed in the cell. The default value is 100, but you can set it higher or lower depending upon
your expected needs. The purpose of the limit is to avoid a circular reference locking up your
application.
Indicates whether formulas are immediately calculated as dependent cells are changed.
Use this property to suspend calculations while a series of changes
are made to dependent cells either by the user or programmatically. When the changes are
complete, set this property to False, and then call Engine.RecalculateRange to recalculate
the affected range. See the sample in GridCellFormulaModel.CalculatingSuspended.
A read-only property that gets a collection holding the current library functions.
This property gives you direct access to all library functions.
The function name serves as the hash key and the function delegate
serves as the hash value.
The function name should contain only letters, digits or an underscore.
You should use the method to add functions
to this collection. Do not use the Add method inherited from Hashtable.
The reason is that the hash key needs to be strictly upper case even though
formula syntax is case insensitive with respect to functions names.
Using the AddFunction method makes sure the hash key is properly set.
A property that gets/sets whether strings concatenated using the '&' operator should be
returned inside double quote marks.
A property that is used to identify whether the exception thrown or not while calculating the value.
Gets any Exception raised during the computation of a library function
provided RethrowLibraryComputationExceptions is set true.
Use the method to set this property
to null to indicate that there is no pending library exception within the engine.
Gets / sets whether the engine Rethrows any exception
raised during the computation of a library function.
The default value is false.
A property that gets or sets the calculations of the computations to mimic the computations of Excel.
Gets or sets the maximum calculation stack depth.
The default is 50. This is the number of recursive calls that can be made during calculations.
Gets or sets a string array that hold the reserved strings
that will be used for the OR, AND, XOR, IF, THEN, ELSE and NOT logical operators.
Here is the code that you can use to define this string array. This code
shows the default strings that are used. Note that the string must include a leading
and trailing blank, and must be lower case. In formulas that use these operators,
the formulas themselves are case agnostic.
engine.ReservedWordOperators = new string[]
{
" or ", //0
" and ", //1
" xor ", //2
" if ", //3
" then ", //4
" else ", //5
" not " //6
};
A static property that gets/sets character by which string starts with, can be treated as formula.
Enables / disables using row = 0 in formulas to represent the current row.
When this property is set True, entering zero as a row in a formula is
interpreted to be the current row. Using the current row notation allows
you to sort a column in the grid and maintain the relative formula.
After sorting, you do have to call engine.RecalculateRange to allow the
relative formulas to reset themselves.
Below property is used to find the active function name.
Gets the cell that is being calculated by the Engine.
You can use this properly within your custom functions to
identify the item in the ICalcData object being computed.
Gets or sets whether IF function calculations should specifically avoid
computing the non-used alternative.
The default value is false for code legacy consistency. When AllowShortCircuitIFs
is set true, only the necessary alternative of an IF function is computed. To support
this behavior, a change in how nested IF function calculations are done is necessary.
The default way of calculating nested functions is inside-out, with the inner most
functions being computed to a value before the next outer function is evaluated. To
support short circuiting IF functions, nested IF functions need to be computed from
the outside-in to know what alternative needs to be evaluated. This outside-in calculation
pattern only applies to IF functions, and only when AllowShortCircuitIFs is true.
Gets or sets whether FormulaInfo.calcID is tested before
computing a formula during a call to
When a value changes, then the Refresh method is called on any other
formula that had a dependency on the changed value. During the Refresh call,
the default behavior is to recompute all formulas (AlwaysComputeDuringRefresh = true).
If you are using to strictly control when new values
should be used, then you should set this property to false. For example, if you are
only using exclusively to retrieve computed values,
then setting AlwaysComputeDuringRefresh = false
may be more efficient as it will only recompute the value once during the calculations.
A property that gets/sets whether Formula returns its FormulaValue instead of repeated calculation
Use this property to return the FormulaValue when a cell contain more depency cells.
Gets or sets whether Invalid Formula is returned when the calculation stack is not fully exhausted during a calculation.
If you enter a formula like "=(1+2)(9+8)", Essential Calculate will compute this formula as 17, ignoring the dangling
3 value on its calculation stack. If you want this situation flagged as a Invalid Formula, set this CheckDanglingStack property
to true. The default value is false for backward compatibility purposes.
Used with row ranges to possibly provide the upperlimit on the number of columns in the ICalcData object.
Essential Calculate supports column ranges of the form 2:4 as in =SUM(2:4) to represent all cells in rows
2, 3 and 4 from a ICalcData object. To get a value for the number of columns, the CalcEngine first checks to
see if the ICalcData object supports the ISheetData interface. If this interface is supported, the column
count used to determine the range is obtained through this interface. If the ICalcData object does not support
ISupportColumnCount, then the value of ColumnMaxCount is used provided ColumnMaxCount > 0. If not, the fixed value 50
is used.
Gets or sets whether the IF function implementation is called when is true.
The default behavior is to not call the IF Function code in the library, but instead, work directly with the
IF clauses.
Gets or sets whether must be called on every cells whenever
the is triggered.
The default value is false.
When a value changes, then the Refresh method is called recursively every time
the grid_ValuChanged is called. Setting this ForceRefreshCall to false will call
Refresh for only those cells where the calculated value is actually modified.
A read-only property that gets the collection of FormulaInfo objects being used by the CalcEngine.
Gets or sets whether leading zeros are preserved in a call to .
If the value of arg is "0123" or a cell reference like A1 where A1 holds 0123, then the default behavior
is for GetValueFromArg(arg) to return 123, stripping away any leading zeros. If you want calls to
GetValueFromArg to preserve the leading zeros, then set GetValueFromArgPreserveLeadingZeros to true.
Gets or sets the maximum number of iterative calls that can be made on a cell.
will be set to true when you set IterationMaxCount to any value other than zero.
Essential Calculate supports an iterative process to solve equations of the
form x=f(x). Here you should think of x as being a cell reference like B2 for example. Setting
IterationMaxCount to some value other than zero allows the engine to iteratively compute
f(x) using the previous iteration's calculated value for x. The initial value is either 0
or the last saved value for a formula in that cell (if the calculation has been performed previously).
The iterations continue until either the iteration count exceeds IterationMaxCount, or two
successive iteration return values have a relative difference less than IterationMaxTolerance.
For example, to have an initial value of 1, you can enter a formula =1 into the cell, and then
enter the self referencing formula into the same cell. This will make the iterative calculations start
at 1 instead of 0.
must be set to true in order for the Iterative Calculation
support to function For this reason, ThrowCircularException will be automatically set to true
when you set a non-zero value to IterationMaxCount.
The default value is 0 indicating that iterative calculation support is turned off.
Gets or sets the success tolerance used by the CalcEngine's iterative calculation support.
Essential Calculate supports an iterative process to solve equations of the
form x=f(x). Here you should think of x as being a cell reference like B2 for example. Setting
IterationMaxCount to some value other than zero allows the engine to iteratively compute
f(x) using the previous iteration's calculated value for x. The initial value is either 0
or the last saved value for a formula in that cell (if the calculation has been performed previously).
The iterations continue until either the iteration count exceeds IterationMaxCount, or two
successive iteration return values have a relative difference less than IterationMaxTolerance.
The default value is 0.001.
Gets or sets a value indicating whether editing a cell’s value will update dependent cells.
The default value is False.
If enabled, editing a cell's value will not update dependent cells based on the edited value.
Used with column ranges to possibly provide the upperlimit on the number of rows in the ICalcData object.
Essential Calculate supports column ranges of the form A:D as in =SUM(A:D) to represent all cells in columns
A, B, C and D from a ICalcData object. To get a value for the number of rows, the CalcEngine first checks to
see if the ICalcData object supports the ISheetData interface. If this interface is supported, the row
count used to determine the range is obtained through this interface. If the ICalcData object does not support
ISupportRowCount, then the value of RowMaxCount is used provided RowMaxCount > 0. If not, the fixed value 50
is used.
Gets or sets whether OR, AND, XOR and IF THEN ELSE logical
operators are supported.
The default value is false for backward compatibility.
Gets or sets whether ranges can be used as binary operands.
If this property is true, Essential Calculate recognizes ranges such
as B1:B5 and A4:E4 as operands of binary operators. So, if you
set the formula = A1:A5 + B1:B5 into cell C4, the calculation
will retrieve the values in A4 and B4 to be used in place of the
corresponding ranges A1:A5 and B1:B5. Note that such ranges must
either have one column wide or one row tall. This fact is used to
make the corresponding lookup determined by where the host cell that holds
the formula is located. This host cell
must either be in the same row or column as some cell in range.
The default value is false.
Gets or sets whether sheet range notation is supported.
Excel supports sheet range notation such as
= SUM( sheet1:sheet3!A1 ) + Sum( sheet1:sheet3!B1:B4 ).
For backward compatibility with earlier versions that did
not support this sheet range notation, you can set
this SupportsSheetRanges false.
This implementation replaces a sheet range (sheet1:sheet3!B1:B4) with
list of ranges (sheet1!B1:B4,sheet2!B1:B4,sheet3!B1:B4).
Gets / sets whether the CalcQuick should throw an exception when a circular calculation is encountered.
If this property is True, the CalcQuick will throw an exception
when it detects a circular calculation. If ThrowCircularException is False, then
no exception is thrown and the calculation will loop recursively until Engine.MaximumRecursiveCalls
is exceeded.
A property that gets / sets whether the CalcEngine should track dependencies.
If you are using the CalEngine in a manner where you always
call PullUpdatedValue to access the computations, then setting UseDependencies
to False will make things more efficient as any requested computed value will
be fully computed every time it is retrieved. In this situation, the CalcEngine
does not need to track dependencies.
For internal use.
Gets or sets a value indicating whether [preserve formula].
true if [preserve formula]; otherwise, false.
A static property that gets/sets character to be recognized by the parsing code as the delimiter for arguments in a named formula's argument list
A static property that gets/sets the character to be recognized by the parsing engine as decimal separator for numbers.
A static property that gets/sets the character to be recognized by the parsing engine as decimal separator for date.
A property that gets/sets list of # error strings recognized by Excel.
Used to store the registed values
The list of error strings which are used within the Essential Calculate internally. Users can make changes to this internal error strings.
Default settings by assigning the new strings to the corresponding position.ReloadErrorStrings should be invoked to reset or modify the internal error strings.
Specifies the options for checking the formula error strings.
Formula contains null arguments. For Example:PI,RANDOM...etc
Formula contains range argument. For example:MEDIAN,...etc
Formula contains two text arguments with Number argument. For example:FIND,SEARCH...etc
Formula contains number and text arguments. For example:LEFT,RIGHT...etc
Formula contains number arguments only. For example:ABS,ROUND,ROUNDDOWN,LOG...etc
Formula contains text arguments only. For example:ARABIC,CLEAN...etc
Formula contains Date argument. For example:DISC,...etc
A method that checks the possible cases for error string(invalid arguments for formula).
The arguments of formula.
The formula's argument type.
Returns the Error string if formula has invalid arguments
Below method has been used to find the negative values(ex formula:=LARGE({6,23,-5,2.3}, 2)).
string contains negative values(eg:-2,-2,-2) or possitve value.
True if the values are number.else false.
A cache storing normalized formulas and their parsed representations.
Extracts cell references from the given formula and replaces them with placeholders (e.g., {C0}, {C1}).
Also returns the list of original references.
The formula to normalize.
The extracted cell references.
The normalized formula with placeholders.
Holds the parsed representation of a formula with placeholder mappings.
Retrieves a parsed version of the formula from the cache, or parses and caches it if not already present.
The original formula to parse and cache.
The parsed formula string.
Rebinds the placeholder references in a cached formula entry with new actual cell references.
The cached formula entry containing the parsed string and original references.
The new cell references to replace the existing placeholders.
Returns true when Namedarange is in the scope and returns cellRange based on scope.
NamedRange
CellRange
True when Namedarange is in the scope.else false.
This method check "\"in the string and removes if the string contains "\"\.
input string.
returns The parsed string value without the "\"\
A method that parses the text in a formula passed in.
The text formula to be parsed.
A string holding a parsed representation of the formula.
A method that parses and computes the string formula passed in.
The text formula to be parsed and computed.
A string holding the computed value.
Accepts an unparsed formula string and replaces any sheet references with corresponding tokens.
The unparsed formula string.
This is an advanced method that lets you replace sheet names with corresponding tokens. You may have need of
this method if you are adding your own functions to the function library.
Tokenizes all library references.
Accepts a string such as Sin(A1+A2) and tokenizes it into
bqSIN[A1A2a]b which serves as input to ComputedValue.
Formula to be tokenized.
A method that adds a function to the function library.
The name of the function to be added.
The function to be added.
True if successfully added, otherwise False.
LibraryFunction is a delegate that defines the signature of functions that
you can add to the function library.
public delegate string LibraryFunction(string args);
A method that removes a function from the function library.
The name of the function to be removed.
True if successfully removed, otherwise False.
Creates and initially loads the function library with the supported functions.
CreateSheetFamilyID is a method to create familyID for a sheet.
Sheet family ID.
Essential Calculate supports multisheet references within a family of ICalcData objects. To use
this functionality, you use this method to get a unique identifier for
the family. Then in the RegisterGridAsSheet method that you call to add ICalcData objects
to this family, you pass this unique identifier to mark the ICalcData objects as belonging
to this family. You can only cross reference ICalcData objects within the same family.
RegisterGridAsSheet is a method that registers an ICalcData object so it can be referenced in a formula from another ICalcData object.
The reference name used to refer to this ICalcData object from formulas in other ICalcData objects.
The ICalcData from the ICalcData object being registered.
/// An integer previously created with a call
to CalcEngine.CreateSheetFamilyID. This number is used to identify
the ICalcData objects as belonging to a particular family of ICalcData objects. You can only reference
ICalcData objects from within the same family.
Essential Calculate supports multisheet references with its formulas. For example, if you
have two ICalcData objects, then you can reference cells from the first ICalcData object
in the second ICalcData object. For this to work, both ICalcData objects need to be registered using this method.
The syntax for using a sheet reference as part of a formula is to prefix a cell reference
with the sheet reference name followed by an exclamation point.
The formula "= sheet1!A1 + sheet2!C3" would add the value is cell A1 for
the ICalcData object whose reference name is sheet1 to the value from cell C3 in the ICalcData object
whose reference name is sheet2.
Use this code to use cross sheet references:
//Register three ICalcData objects so cell can be referenced across ICalcData objects:
int sheetfamilyID = CalcEngine.CreateSheetFamilyID();
myCalcEngine.RegisterGridAsSheet("summary", calcData1, sheetfamilyID);
myCalcEngine.RegisterGridAsSheet("income", calcData2, sheetfamilyID);
myCalcEngine.RegisterGridAsSheet("expenses", calcData3, sheetfamilyID);
....
//Sample formula usage for cells in calcData1, the 'summary' data source.
//This code sums ups some cells from calcData3, the 'expenses' data source
//and calcData2, the 'income' data source.
//Sum the range B2:B8 from expenses:
string sumExpenses = "= Sum(expenses!B2:expenses!B8)";
//Sum the range B2:B4 from income:
string sumIncome = "= Sum(income!B2:income!B4)";
'Register three ICalcData objects so cell can be referenced across ICalcData objects:
Dim sheetfamilyID As Integer = CalcEngine.CreateSheetFamilyID();
myCalcEngine.RegisterGridAsSheet("summary", calcData1, sheetfamilyID)
myCalcEngine.RegisterGridAsSheet("income", calcData2, sheetfamilyID)
myCalcEngine.RegisterGridAsSheet("expenses", calcData3, sheetfamilyID)
....
'Sample formula usage for cells in calcData1, the 'summary' data source.
'This code sums ups some cells from calcData3, the 'expenses' data source
'and calcData2, the 'income' data source.
'Sum the range B2:B8 from expenses:
Dim sumExpenses As String = "= Sum(expenses!B2:expenses!B8)"
'Sum the range B2:B4 from income:
Dim sumIncome As String = "= Sum(income!B2:income!B4)"
Unregisters a grid so it can no longer be referenced in a formula from another grid.
The reference name used to refer to this grid from formulas in other grids.
The grid model.
Change the sheet name of with the given name.
Name of the sheet.
The ICalcData object.
A read-only property that gets a mapping between a cell and a list of formula cells that depend on it.
The key is the given cell, and the value is a ArrayList of cells containing
formulas that reference this cell.
Here is code that will list formula cells affected by changing the given cell.
public void DisplayAllAffectedCells()
{
CalcEngine engine = ((GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"]).Engine;
foreach(object o in engine.DependentCells.Keys)
{
string s1 = o as string;
Console.Write(s1 + " affects ");
ArrayList ht = (ArrayList) engine.DependentCells[s1];
foreach(object o1 in ht)
{
string s2 = o1 as string;
Console.Write(s2 + " ");
}
Console.WriteLine("");
}
}
Public Sub DisplayAllAffectedCells()
Dim engine As GridCalcEngine = CType(Me.gridControl1.CellModels("FormulaCell"), GridFormulaCellModel).Engine
Dim o As Object
For Each o In engine.DependentCells.Keys
Dim s1 As String = CStr(o)
Console.Write((s1 + " affects "))
Dim ht As ArrayList = CType(engine.DependentCells(s1), ArrayList)
Dim o1 As Object
For Each o1 In ht
Dim s2 As String = CStr(o1)
Console.Write((s2 + " "))
Next o1
Console.WriteLine("")
Next o
End Sub 'DisplayAllAffectedCells
A read-only property that gets a mapping between a formula cell and a list of cells upon which it depends.
The key is the given formula cell and the value is a Hashtable of cells that this
formula cell references.
Here is code that will lists formula cells affected by changing a given cell:
public void DisplayAllFormulaDependencies()
{
GridCalcEngine engine = ((GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"]).Engine;
foreach(object o in engine.DependentFormulaCells.Keys)
{
string s1 = o as string;
Console.Write(s1 + " depends upon ");
Hashtable ht = (Hashtable) engine.DependentFormulaCells[s1];
foreach(object o1 in ht.Keys)
{
string s2 = o1 as string;
Console.Write(s2 + " ");
}
Console.WriteLine("");
}
}
Public Sub DisplayAllFormulaDependencies()
Dim engine As GridCalcEngine = CType(Me.gridControl1.CellModels("FormulaCell"), GridFormulaCellModel).Engine
Dim o As Object
For Each o In engine.DependentFormulaCells.Keys
Dim s1 As String = CStr(o)
Console.Write((s1 + " depends upon "))
Dim ht As Hashtable = CType(engine.DependentFormulaCells(s1), Hashtable)
Dim o1 As Object
For Each o1 In ht.Keys
Dim s2 As String = CStr(o1)
Console.Write((s2 + " "))
Next o1
Console.WriteLine("")
Next o
End Sub 'DisplayAllFormulaDependencies
Triggers a calculation for any value depending upon the given cell.
The cell.
Returns the GridSheetFamilyItem for the specified model. If there was no item registered for
the model, a new item is created and cached.
The grid model.
The GridSheetFamilyItem for the specified model.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Return the value of arraybounds as boolean
current cell
height
width
firstrowindex
firstcolumnindex
lastrowindex
lastcolumnindex
A method to retrieve the row index from a cell reference.
String holding a cell reference such as C21 or AB11.
An integer with the corresponding row number.
A method that gets the column index from a cell reference passed in.
String holding a cell reference such as C21 or AB11.
An integer with the corresponding column number.
Determines whether the arg is a valid cell name.
Cell name.
True is the arg is a valid cell name, false otherwise.
To check whether the row index can be obtained from the arguments
A method to split the arguments using argument seperator.
arguments to split.
argument seperator used to split.
A string array.
Removes outer quote marks from a string with no inner quote marks.
The string with possible outer quote marks.
The string with any outer quote marks removed.
This is a utility method that removes outer quotes on a string.
Returns an array of argument strings from a single string where the arguments are delimited by .
Contains the argument list.
A string array of arguments.
This method properly preserves any quoted strings that contain the character.
Tests whether a string is NULL or empty.
String to be tested.
True is passed in string is null or empty, otherwise False.
Given a string, it returns a string that is passed through the FormulaParsing event
to allow any listener to modify it.
A string that is to be potentially parsed.
Accepts a possible parsed formula and returns the calculated value
without quotes.
The argument to be adjusted.
This method is useful in custom functions if you want to allow
your custom functions to handle parsed formulas as arguments. In
this case, calling this method at the beginning of your custom function
will allow you custom function to work only with computed values, and not
have to handle parsed formulas directly.
Call this method to clear whether an exception was raised during the computation of a library function.
Returns the value of specified cell in a Grid.
Cell address
If true, compute the formula and returns calculated result.
Else, simply returns the value of the cell.
value of the cell
Conditionally gets either the formula value or the cell
value depending upon whether the requested cell is a FormulaCell.
Row index of the requested cell.
Column index of the requested cell.
String holding either the cell value or the computed formula value.
Computes the exact date value when the input string is based on time span.
value to be converted into date.
computed date for the time.
returns true if the value can be converted to date time.
Conditionally gets either the formula value or the cell
value depending upon whether the requested cell is a FormulaCell.
The ICalcData object holding the requested cell.
Row index of the requested cell.
Column index of the requested cell.
String holding either the cell value or the computed formula value.
Returns the value of specified cell in a Grid.
The ICalcData object holding the requested cell.
Row index of the requested cell.
Column index of the requested cell.
If true, compute the formula and returns calculated result.
Else, simply returns the value of the cell
the value of the cell.
A Virtual method to compute the value based on the argument passed in.
This method takes the argument and checks whether it is a
parsed formula, a raw number, or a cell reference like A21.
The return value is a string that holds the computed value of
the passed in argument.
A parsed formula, raw number, or cell reference.
A string with the computed number in it.
A method that retrieves a string array of cells from the range passed in.
Converts arguments in these forms to a string array of individual cells:
A1,A2,B4,C1,...,D8
A1:A5
A1:C5
String containing a cell range.
String array of cells.
A method that retrieves a string array of cells from the range passed in.
Converts arguments in these forms to a string array of individual cells:
A1,A2,B4,C1,...,D8
A1:A5
A1:C5
String containing a cell range.
default value is true.
String array of cells if findCellsFromRange is true.otherwise return cell reference.
This method recalculates any formula cells in the specified range.
The calculations for non-visible formula cells are performed the next time
cell are actually displayed. If you want the calculation performed immediately
on cells (visible or not), call the two argument overload of RecalculateRange,
passing the forceCalculations argument as True.
GridRangInfo object that specifies the cells to be recalculated.
ICalcData object that holds the data to be recalculated.
An overridden method to display information on the cell currently being calculated.
String with information on the cell currently being calculated.
Conditionally gets either the formula value or the cell
value depending upon whether the requested cell is a FormulaCell.
The alphanumeric cell label, like A1, or EE14.
String holding either the cell value or the computed formula value.
Conditionally gets either the formula value or the cell
value depending upon whether the requested cell is a FormulaCell.
Row index of the requested cell.
Column index of the requested cell.
String holding either the cell value or the computed formula value.
Evaluates a parsed formula.
A string holding a valid parsed formula.
The computed value of the formula.
The string passed into this function must be previously parsed
using ParseFormula.
Compute the NestedIF formulas using the old code structure of CalcEngine.
formula to execute / compute
Compute the NestedIF formulas using new parse and compute technique.
formula to execute / compute
This method is used to retrieve the exact results from a cell reference based on the cell formula.
This parameter represents the Parameter of IF formulas it can be either logical true or logical false.
This parameter represents the result of the IF formulas parameter.
Returns zero if the cell reference does not have any formula; otherwise, it returns the value of the formula in the cell reference.
A method that computes a parsed formula.
The parsed formula to be computed.
A string holding the computed value.
This method retrieves the value in the requested cell reference using fresh computations
for any cells that affect the value of the requested cell.
A cell reference like: Sheet5!B14
A freshly computed value for the cell.
PullUpdatedValue is a method used to recompute the cells that are referred to compute the requested value.
Integer identifying the ICalcData object.
The row in the ICalcData object.
The column in the ICalcData object.
A method that increases the calculation level of the CalcEngine.
Every formula has a calculation ID level associated with it. Every time
a formula is retrieved, its calculation ID level is compared with the CalcEngine
ID level. If they do not agree, the formula is recomputed. Calling UpdateCalcID
will force any formula to be recomputed the next time it is retrieved.
Refresh is a method that recalculates any cell that depends upon the passed in cell.
A cell such as A21 or EE31.
Returns the amount received at maturity for a fully invested security.
Number and the number of digits
Received amount
Counts the nonblank cells in a field (column) of records in a list or database that match conditions that you specify.
Number and the number of digits
Received amount
Averages the values in a field (column) of records in a list or database that match conditions you specify.
Number and the number of digits
Received amount
Extracts a single value from a column of a list or database that matches conditions that you specify.
Number and the number of digits
Received amount
Returns the largest number in a field (column) of records in a list or database that matches conditions you that specify.
Number and the number of digits
Received amount
Returns the smallest number in a field (column) of records in a list or database that matches conditions that you specify.
Number and the number of digits
Received amount
Returns the smallest number in a field (column) of records in a list or database that matches conditions that you specify.
Number and the number of digits
Received amount
Estimates the variance of a population based on a sample by using the numbers in a field (column) of records in a list or database that match conditions that you specify.
Number and the number of digits
Received amount
Calculates the variance of a population based on the entire population by using the numbers in a field (column) of records in a list or database that match conditions that you specify.
Number and the number of digits
Received amount
Estimates the standard deviation of a population based on a sample by using the numbers in a field (column) of records in a list or database that match conditions that you specify.
Number and the number of digits
Received amount
Calculates the standard deviation of a population based on the entire population by using the numbers in a field (column) of records in a list or database that match conditions that you specify.
Number and the number of digits
Received amount
Adds the numbers in a field (column) of records in a list or database that match conditions that you specify
Number and the number of digits
Received amount
Used to get the data from arguments
Arguments
This field is enable when the criteria is double.
Returns the archyperbolic cosecant of an angle.
A cell reference or a cell or a number
A string containing the archyperbolic cosecant of an angle
Returns the full product of two 32-bit numbers.
The two 32 bit numbers.
A string containing the product of two 32 bit numbers.
Calculates the quotient of two 64-bit signed integers and also returns the remainder in an output parameter.
returns the quotient of two 64-bit signed integers.
Returns the remainder resulting from the division of a specified number by another specified number.
contains a divisor and dividend
Returns the remainder.
replaces part of a text string, based on the number of characters, with a different text string
Text in which is want to replace, The position of the character in old_text., The number of characters in old_text
returns replaced text
Returns the row index of the passed in cell reference.
Contains zero or one argument. If no argument is passed, returns the row index of the
location of this Row function cell, otherwise returns the row index of the passed in cell reference.
The row index.
This method doesn't return an array of row numbers as the array formula entry is not supported in engine. It is another usecase of this library function.
This method is deprecated. Please use the instead.
Returns the m parameter of the exponential curve y = b * m^x that best fits the given points. Only the first two Excel parameters are used.
Y_range, x_range.
returns m parameter.
Returns the b value from the exponential curve y = b * m^x.
Y_range, x_range.
returns calculated b value.
Returns the most recent points from an array (the points with the highest index values).
For functions with a decay factor, the weight on the last element in the array is the highest.
In many applications this corresponds with the assumption that the last element in the array represents the most recent data point.
Array from which the data points will be selected.
The number of data points to be returned.
Returns the mean of an array.
Array of data for which we are calculating the mean. For time series, the last element (index = n-1), is the most recent.
In most applications, the decay factor is between 0 and 1. Weigth on the last element in array is 1.0, the 2nd to last element d, 3rd to last d^2, ...
Window length. Method uses the most recent n points, n = length.
Returns the weighted averages of the values in valueArray using the corresponding weights in weightArray.
array of values for which we are computing the weighted average
array of weights used in computing the weighted average
Returns the CDF of the uniform distribution.
Value at which the distribution is evaluated.
Minimum value of the distribution.
Maximum value of the distribution.
Returns the half-life of a geometric series of length n, who's first element is 1.
For decay factor d, 1 + d + d^2 + ... + d^(h-1) = 0.5 * [1 + d + d^2 + ... + d^(n-1)]
Decay factor Typically between -1 adn +1.
Number of elements in the geometric series, must be positive.
Returns the sum of a geometric series of length n, who's first element is 1.
For decay factor d, S = 1 + d + d^2 + ... + d^(n-1)
Decay factor Typically between -1 adn +1.
Number of elements in the geometric series, must be positive.
Returns the sum of an infinite geometric series who's first element is 1.
For decay factor d, S = 1 + d + d^2 + ...
Decay factor. Typically between -1 adn +1.
Returns the sample covariance between two arrays.
Arrays should be of equal length, and contain more than one element.
In most applications, the decay factor is between 0 and 1. Weigth on the last element in arrays is 1.0, the 2nd to last element d, 3rd to last d^2, ...
Recalculates every cell that depends upon any cell in the passed-in range.
For example, if range is RangeInfo(1,1,2,2), and cells (5,6) and
(12,17) hold formulas that reference the cells in the range, then cells (5,6)
and (12,17) will be re-computed as the result of this call.
RangeInfo object to be refreshed.
Clears any variable names registered with the CalcEngine.
Registers a list of variable names so you can use it within formulas.
List of names.
Swaps variable names for tokens.
The formula holding variable names.
The formula with tokens.
Return the value of besseli1
value
Return the value of the besselk1
value
Return the value of besselk0
value
A method to get submatrix for matrix function used internally.
double Array - Matrix
Matix rows
Columns
Matrix
Return the value of between strings
source string
start
end
Gets the text of any formula at the given row and column of the ICalcData object.
The ICalcData object.
The one-based row in the grd object.
The one-based col in the grd object.
String containing the text of the formula.
If the data item at row and column is not a formula, the
return value is an empty string.
Retrieves the current CalcEngine calculation level ID.
Current calculation level ID.
A method to reset the cached ICalcData object IDs.
Resets the internal sheet token marker to 0.
When RegisterGridAsSheet is called to add a ICalcData object to a CalcEngine,
this newly added sheet is associated with an integer used in tokenizing formulas.
This sheetID integer is required in the PullUpdatedValue method to specify the ICalcData
object being accessed. The GetSheetID method allows you to retrieve a sheetID given
an ICalcData object. This internal sheet token marker is a static member of CalcEngine,
and is incremented each time a new ICalcData object is registered with the CalcEngine
using RegisterGridAsSheet.
Return the value of HandleIteration
value
formula
Compares 2 strings based on their length.
0, if both strings are equal; positive value if second string is greater; neagative value if first string is greater.
Returns the number of days since 01 Jan 1900.
Year, month, and day.
Number of days.
Returns the number of days since 01 Jan 1900.
Text containing a date.
Number of days.
Returns the day of the serial number date.
Serial number date.
Day of the given date.
Number of days between 2 dates using 360 day year.
Serial number date1, serial number date1 and method.
Days between the dates.
returns the fraction of the year represented by the number of whole days between two given dates
startDate, endDate, basis (optional)
returns the fraction of the year
Returns the number of days between two dates.
startDate, endDate
Returns the number of days
returns the date of given date after the specific month
startDate, months
returns the date
Returns the last date of the date after the specific month of given date.
startDate, month
return the date.
Returns the week number of a specific date
serial_number,start_day of week (optional)
1 or omitted - Sunday
2 Monday
11 Monday
12 Tuesday
13 Wednesday
14 Thursday
15 Friday
16 Saturday
17 Sunday
21 Monday
returns the week number
Returns ISO week number of the year for a given date
date
returns ISO week number
returns the date of the given date after the number of working days
startDate, days, holidays (optional)
returns the date
Returns the value of ComputeNetworkDays
arguments
Returns the number of whole workdays between two dates, week end and holidays are not consider as working days
start_date, end_date,weekend (optional), holidays (optional)
return the work days
Returns the serial number of the given date before or after a specified number of workdays
startDate, days, weekend (optional) , holidays (optional)
return the serial number of specific date.
Returns the hour of the given time.
Given time.
Hour of given time.
Returns the minute of the given time.
Given time.
Minute of given time.
Returns the second of the given time.
Given time.
Second of given time.
Returns the month of the given date.
given time
Month of given date.
Returns the current date and time as a date serial number.
Parameter Ignored.
Current date and time as serial number.
Returns the current date as a date serial number.
Parameter Ignored.
Current date as date serial number.
Returns a fraction of a day.
Hour, minute, and second.
Fraction of a day.
Returns a fraction of a day.
Time as a text string.
Fraction of a day.
Day of the week.
Serial number date1 and return_type.
Days between the dates.
Returns the year of the given date.
Given date.
Month of given date.
Returns the number of days or months or years between two dates.
Start date, end date and unit.
The number of days, months, or years between two dates.
Gets the weekend type
Calculates the Output to the concerned base.
Data to be converted.
Base of the Given Data
Base to be obtained.
The data concerning to the base in 'to' parameter
Computes the Binary value for the given Decimal Number.
Data to be converted.
Returns the calculated Binary value.
Computes the Octal value for the given Decimal Number.
data to be converted.
Returns the calculated Octal value.
Computes the Hexadecimal value for the given Decimal Number.
Data to be converted.
Returns the calculated Hexadecimal value.
Computes the Octal Number for the given binary NUmber.
Input BinaryNumber
The resultant Octal Number
Computes the Decimal Number for the given binary NUmber.
Input BinaryNumber
The resultant Decimal Number
Computes the Binary value for the given Hexadecimal Data.
Data to be converted.
Returns the calculated Binary value.
Computes the Octal Equivalent for the given Hexadecimal value
Data to be converted.
The calculated Octal value for the given.
Computes the Decimal Equivalent for the given Hexadecimal value
Data to be converted.
The calculated Decimal value for the given.
Computes the Binary value for the given Octal Number.
Data to be converted.
Returns the calculated Binary value.
Calculates the Hexadecimal equivalent value for the given Octal value
Data to be converted.
The Converted Hexadecimal value.
Computes the Decimal Equivalent for the given Octal value
The Value to be converted to Decimal
The calculated value for the given
Gets the Real part of the given Complex number.
Given complex number.
Real part of the given complex Number.
Gets the Imaginary part of the given Complex number.
Given complex number.
Imaginary part of the given complex Number.
Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format.
Input Complex Number
The absolute value (modulus) of given complex number
Computes the Product of the given Complex Numbers
Input Complex Numbers
The multiplied result of the two complex numbers.
Obtains the complex number for the given real and imaginary part.
Given real and Imaginary part.
The complex number derived from the real and imaginary part.
Computes the sum of two complex number.
Parameter that is used for performing sum
The calculated sum of the numbers
Computes the Difference of two complex number.
Parameter that is used for performing Subtraction
The calculated difference of the numbers
Returns the complex conjugate of a complex number in x + yi or x + yj text format.
Input Complex Number
The complex conjugate of a complex number in x + yi or x + yj text format.
Computes the Division of the given Complex Numbers
Input Complex Numbers
The Divided result of the two complex numbers.
Returns the Square Root of the given Complex Number.
Input Complex Number
The Square Root of the given Complex Number.
Returns the argument (theta), an angle expressed in radians
Input Complex Number
The argument (theta), an angle expressed in radians
Returns the IMSin of the given Complex Number.
Input Complex Number
The IMSin of the given Complex Number.
Returns the Hyperbolic Sine value of the given Complex Number.
Input Complex Number
The Hyperbolic Sine Value of the given Complex Number.
Returns the IMCSC of the given Complex Number.
Input Complex Number
The IMCSC of the given Complex Number.
Returns the IMCos of the given Complex Number.
Input Complex Number
The IMCos of the given Complex Number.
Returns the IMSEC of the given Complex Number.
Input Complex Number
The IMSEC of the given Complex Number.
Returns the IMTan of the given Complex Number.
Input Complex Number
The IMTan of the given Complex Number.
Returns the IMCot of the given Complex Number.
Input Complex Number
The IMCot of the given Complex Number.
Returns the IMCSCH of the given Complex Number.
Input Complex Number
The IMCSCH of the given Complex Number.
Returns the Hyperbolic Cos value of the given Complex Number.
Input Complex Number
The Hyperbolic Cos Value of the given Complex Number.
Returns the IMTanH of the given Complex Number.
Input Complex Number
The IMTanH of the given Complex Number.
Returns the IMCotH of the given Complex Number.
Input Complex Number
The IMCotH of the given Complex Number.
Returns the IMSecH of the given Complex Number.
Input Complex Number
The IMSecH of the given Complex Number.
Returns the LOG10 value of the given Complex Number.
Input Complex Number
The Log10 of the given Complex Number.
Returns the Log2 of the given Complex Number.
Input Complex Number
The Log2 of the given Complex Number.
Returns the LOG value of the given Complex Number.
Input Complex Number
The Log of the given Complex Number.
Returns the Exponent of the given Complex Number.
Input Complex Number
The Exponent of the given Complex Number.
Returns the power of the given Complex Number.
Input Complex Number
The power of the given Complex Number.
Computes the Difference of two complex number.
Parameter that is used for performing Subtraction
The difference of two complex numbers in x + yi or x + yj text format.
Computes the Bit OR of the given two numbers.
Input Numbersfor which the OR operations has to be performed.
Bit OR value of the given two numbers.
Computes the Bit XoR of the given two numbers.
Input Numbersfor which the OR operations has to be performed.
Bit OR value of the given two numbers.
Computes the Bit AND of the given two numbers.
Input Numbersfor which the AND operations has to be performed.
Bit AND value of the given two numbers.
Computes the Bit Left Shift of the given number.
Input Numbersfor which the OR operations has to be performed.
Bit Left Shift value of the given number.
Computes the Bit Right Shift of the given number.
Input Numbersfor which the Bit Right Shift operations has to be performed.
Bit Right Shift value of the given number.
Returns the error function .
Input Number
The error function.
Returns the Complement of error function .
Input Number
The Complement of error function.
Returns the error function .
Input Number
The error function.
Return the value of the ComputeBesselI
arguments
Return the value of besseli0
value
Returns the BesselJ function of order n of the specified number.
Input Number
The BesselJ of the Number.
Returns the Bessel function of order 1 of the specified number.
Returns the Bessel function of order 0 of the specified number.
Returns the BesselY function of order n of the specified number.
Input Number
The BesselY of the Number.
Returns the Bessel function of the second kind, of order 0 of the specified number.
Returns the Bessel function of the second kind, of order 1 of the specified number.
Returns the value of ComputebesselK
arguments list
Returns the value of ComputeConversion
arguments list
Gets or sets whether dates can be used as operands in calculations. The default value is false.
Gets / sets whether the engine throws an exception when
parsing fails with an unknown function error.
The List holds the formats of a Chinese Language.
Gets or sets whether lookup tables used in the VLookUp and HLookUp functions are cached.
Depending upon your use case, caching look up tables can greatly speed up calculations involving HLookUp
and VLookUp. If you make multiple calls to these functions passing in the same look up tables, and if these
look up tables are relatively static (don't dynamically change as the look ups are taking place), then caching
these tables will likely improve performance.
Clears all look up caches used in HLookUp and VLookUp calculations so they will be recreated the
next time one of these functions is used.
Returns the value of Clearsheet
Icalcdata
Use this method to reset internal error strings if you make changes to .
This method used to find the sheet id of the parsed grid.
Intsance of ICalcData
The sheet id of the grid
Used to find the determinant internally for matrix function
double array
array length
double value
Returns the Probabilitydistribution of the normal distribution.
Value at which the distribution is evaluated.
Mean of the distribution.
Standard deviation of the distribution.
find the cofactor of matrix
array length
return the inverse matrix
return success state
To find the inverse of matrix
matrix
cofactor matrix
matrix length
Inveser matrix
Inverse Matrix
Chi-squared probability density function.
The value at which the PDF is evaluated.
Degress of freedom, or number independent standard normal distributions.
Returns the inverse of the CDF of the normal distribution.
Cumulative probability of the distribution. 0 <= p >= 1.
Mean of the distribution.
Standard deviation of the distribution.
Returns the inverse of the CDF of the standard normal distribution.
Cumulative probability of the distribution. p is between 0 and 1.
Computes the net present value an investment.
Delimited string containing the rate as percentage per period
and a list of invested values.
Net present value.
Computes the payment for a loan.
Delimited string containing the rate as percentage per period,
number of periods, present value, future value, and payment type (0 = end of period, 1 = start of period).
Payment amount.
Computes the principal payment for a period.
Delimited string containing the rate as percentage per period, the period,
number of periods, present value, future value, and payment type (0 = end of period, 1 = start of period).
Principal payment.
Computes the present value of an investment.
Delimited string containing the rate as percentage per period,
number of periods, payment per period, future value, and payment type (0 = end of period, 1 = start of period).
Present value.
Compute the effective annual interest rate.
the nominal annual interest rate and the number of compounding periods per year
The effective annual interest rate.
Computes the internal rate of return of a series of cash flows.
Delimited string containing a range of cells and an initial guess.
Internal rate of return.
This IRR calculation uses Newton's method to approximate a root of
f(r) = Sum( values[i]/(1+r)^i) = 0
where the Sum index is i = 1 to the number of values. The algorithm returns a value if
the relative difference between root approximations is less than 1e-7. It fails if this
accuracy is not attained in 20 iterations.
Computes the straight-line depreciation of an asset per period.
Delimited string containing the cost,
salvage value, and life.
Depreciation of the asset.
Computes the sum of years digits depreciation of an asset per period.
Delimited string containing the cost,
salvage value, life, and period.
Depreciation for the requested period.
Computes the variable declining balance of an asset.
Delimited string containing the initial cost,
salvage value, life of asset, period of calculation, and factor.
Variable declining balance.
Converts a number to text using currency format.
Number and the number of digits.
Currency format string.
Converts a number to text using currency format.
Number and the number of digits.
Currency format string.
Returns the weighted average of the present value of the cash flows
Number and the number of digits
Number of years
Calculates the accrued interest of a security that pays interest at maturity.
Number and the number of digits
Accrued interest
Calculates the equivalent interest rate for the growth of an investment.
Investment periods, present and future value of the investments.
Returns the equivalent interest.
Returns the future value of an initial principal after applying a series of compound interest rates.
Number and the number of digits
Number of future value
Returns the interest rate for a fully invested security.
Number and the number of digits
Rate of interest
Returns the discount rate for a security.
Number and the number of digits
Rate of Discount
Computes the future value of an investment.
Delimited string containing the rate as percentage per period,
number of periods, payment per period, present value, and payment type (0 = end of period, 1 = start of period).
Future value of the investment.
Computes the interest payment for a period.
Delimited string containing the rate as percentage per period, the period,
number of periods, present value, future value, and payment type (0 = end of period, 1 = start of period).
Interest payment.
Computes the internal rate of return of a series of cash flows.
Delimited string containing a range of cells and an initial guess.
Internal rate of return.
This IRR calculation uses Newton's method to approximate a root of
f(r) = Sum( values[i]/(1+r)^i) = 0
where the Sum index is i = 1 to the number of values. The algorithm returns a value if
the relative difference between root approximations is less than 1e-5. It fails if this
accuracy is not attained in 20 iterations.
Computes the internal rate of return for a schedule of possibly non-periodic cash flows.
A list of two or three arguments. The first argument contains a range of cash flows, the second argument
contains a list of corresponding date serial number values, and the third argument contains an initial guess at the return value.
The internal rate of return.
The computation uses a root finding algorithm. If the algorithm does not converge to a result within 100 iterations,
an error is returned. The convergence requirement is an absolute error of 0.000001. The first date must be the earliest date,
and the dates must be date serial numbers. Also, there must be at least one positive cash flow and at least one negative cash
flow in the cash flow values.
Computes the extended internal rate of return for a schedule of possibly non-periodic cash flows.
Which contains the non periodic cashflows.
Which contains the details about the investment days of non-periodic cash flows.
Which denotes the inital guess value.
Returns the xiir calculation value.
Computes the extended internal rate of return for a schedule of possibly non-periodic cash flows.
Which contains the non periodic cashflows.
Which contains the details about the investment days of non-periodic cash flows.
Which denotes the guess value.
Returns the xiir calculation value.
Computes the Net Present Value for a schedule of possibly non-periodic cash flows.
Which contains the non periodic cashflows.
Which contains the details about the investment days of non-periodic cash flows.
Which denotes the guess value.
Returns the Net Present Value.
Computes the Net Present Dervative Value for a schedule of possibly non-periodic cash flows.
Which contains the non periodic cashflows.
Which contains the details about the investment days of non-periodic cash flows.
Which denotes the guess value.
Returns the Net Present Dervative Value.
Computes the simple interest payment.
Delimited string containing the rate as percentage per period, the period,
number of periods, and present value.
Simple interest payment.
Computes the modified internal rate of return of a series of cash flows.
Delimited string containing a range of cells,
finance interest rate, and a reinvested interest rate.
Modified internal rate of return.
Computes the number of periods an investment.
Delimited string containing the rate as percentage per period,
payment per period, present value, future value, and payment type (0 = end of period, 1 = start of period).
Number of periods.
Computes the declining balance of an asset.
Delimited string containing the initial cost,
salvage value, life of asset, period of calculation, and months in the initial year.
Declining balance.
Computes the double declining balance of an asset.
Delimited string containing the initial cost,
salvage value, life of asset, period of calculation, and factor.
Double declining balance.
Returns the cumulative interest paid for an investment period with a constant interest rate.
Number and the number of digits
Number of interest rate
Calculates the accrued interest of a security in the case of periodic payments.
Number and the number of digits
Accrued interest
Returns the cumulative principal paid for an investment period with a constant interest rate.
Number and the number of digits
Cumulative principal value
Returns the amount received at maturity for a fully invested security.
Number and the number of digits
Received amount
This function computes the nominal interest rate based on the effective annual interest rate and the number of compounding periods per year.
A comma-separated string containing two values. The format should be: effective_rate, npery.
- effective_rate: The effective annual interest rate as a decimal (e.g., 0.053543 for 5.3543%).
- npery: The number of compounding periods per year as an integer (e.g., 4 for quarterly compounding).
A string representing the nominal interest rate. If the input is invalid or cannot be parsed, an error message is returned.
The nominal interest rate is calculated using the formula:
nominalRate = npery * (Math.Pow(1 + effectRate, 1.0 / npery) - 1)
where effectRate is the effective annual interest rate and npery is the number of compounding periods per year.
The method checks that the effective annual interest rate is positive and that the number of compounding periods is at least 1.
If the inputs are invalid (e.g., non-numeric values, negative rates, or invalid period counts), an appropriate error message is returned.
This function calculates the Modified Duration (MDuration) of a security, similar to the MDuration function in Excel.
This measure indicates how sensitive the bond's price is to changes in interest rates, adjusted for the bond's yield and the frequency of its coupon payments.
A comma-separated string of arguments. The format should be: settlement_date, maturity_date, coupon_rate, yield_rate, frequency, [basis].
- settlement_date: The date when the bond is purchased (format: DATE function or serial number).
- maturity_date: The date when the bond matures (format: DATE function or serial number).
- coupon_rate: The annual coupon rate of the bond as a decimal (e.g., 0.08 for 8%).
- yield_rate: The annual yield of the bond as a decimal (e.g., 0.09 for 9%).
- frequency: The number of coupon payments per year (e.g., 1 for annual, 2 for semiannual, 4 for quarterly).
- basis: Optional. The day count basis to use (0 for US 30/360, 1 for Actual/Actual, 2 for Actual/360, 3 for Actual/365, 4 for European 30/360).
A string representing the modified duration of the bond, rounded to a reasonable number of decimal places.
If any input is invalid (e.g., incorrect date format, negative rates, or invalid frequency), an error message is returned.
Calculates the modified duration of a bond given its parameters.
The bond's settlement date.
The bond's maturity date.
The bond's annual coupon rate.
The bond's annual yield.
The number of coupon payments per year.
The day count basis for the bond's interest calculation.
The modified duration of the bond as a string.
This function computes the number of periods required for an investment to reach a specified future value based on the given interest rate and present value.
A comma-separated string of arguments. The format should be: rate, present_value, future_value.
- rate: The interest rate per period as a decimal (e.g., 0.025 for 2.5%).
- present_value: The current value of the investment.
- future_value: The desired future value of the investment.
A string representing the number of periods required to reach the future value, rounded to two decimal places.
If any input is invalid (e.g., negative values or non-numeric inputs), an error message is returned.
This function computes the next coupon date after the settlement date for a bond and returns the date as a serial date number.
A comma-separated string of arguments. The format should be: settlement_date, maturity_date, frequency, [basis].
- settlement_date: The date when the bond is purchased (format: DATE function or serial number).
- maturity_date: The date when the bond matures (format: DATE function or serial number).
- frequency: The number of coupon payments per year (e.g., 1 for annual, 2 for semiannual, 4 for quarterly).
- basis: Optional. The day count basis to use (0 for US 30/360, 1 for Actual/Actual, 2 for Actual/360, 3 for Actual/365, 4 for European 30/360).
A string representing the next coupon date after the settlement date, formatted as a serial date number.
If any input is invalid (e.g., incorrect date format, invalid frequency, or if the settlement date is on or after the maturity date), an error message is returned.
Checks and parses the input arguments for COUP functions.
A string containing the arguments: settlement date, maturity date, frequency, and optionally, the basis.
Outputs the parsed settlement date.
Outputs the parsed maturity date.
Outputs the parsed coupon payment monthBetweenCoupon
Outputs the parsed day count basis (0-4).
Returns an error message if arguments are invalid, otherwise an empty string.
This function computes the previous coupon date before the settlement date for a bond and returns the date as a serial date number.
A comma-separated string of arguments. The format should be: settlement_date, maturity_date, frequency, [basis].
- settlement_date: The date when the bond is purchased (format: DATE function or serial number).
- maturity_date: The date when the bond matures (format: DATE function or serial number).
- frequency: The number of coupon payments per year (e.g., 1 for annual, 2 for semiannual, 4 for quarterly).
- basis: Optional. The day count basis to use (0 for US 30/360, 1 for Actual/Actual, 2 for Actual/360, 3 for Actual/365, 4 for European 30/360).
A string representing the previous coupon date before the settlement date, formatted as a serial date number.
If any input is invalid (e.g., incorrect date format, invalid frequency, or if the settlement date is on or after the maturity date), an error message is returned.
This function computes the number of days from the beginning of the coupon period to the settlement date for a bond.
A comma-separated string of arguments. The format should be: settlement_date, maturity_date, frequency, [basis].
- settlement_date: The date when the bond is purchased (format: DATE function or serial number).
- maturity_date: The date when the bond matures (format: DATE function or serial number).
- frequency: The number of coupon payments per year (e.g., 1 for annual, 2 for semiannual, 4 for quarterly).
- basis: Optional. The day count basis to use (0 for US 30/360, 1 for Actual/Actual, 2 for Actual/360, 3 for Actual/365, 4 for European 30/360).
A string representing the number of days from the beginning of the coupon period to the settlement date.
If any input is invalid (e.g., incorrect date format, invalid frequency, or if the settlement date is on or after the maturity date), an error message is returned.
Computes the number of days in the coupon period that contains the settlement date.
The settlement date.
The maturity date.
The coupon frequency (1, 2, or 4).
The day count basis (0 to 4).
A string representing the number of days in the coupon period.
Calculates the number of days between two dates based on the 30/360 day count convention.
The start date.
The end date.
The day count basis: 0 for US (NASD) 30/360, 4 for European 30/360.
The number of days between the start and end dates, adjusted according to the specified 30/360 basis.
This function computes the number of days from the settlement date to the next coupon date for a bond.
A comma-separated string of arguments. The format should be: settlement_date, maturity_date, frequency, [basis].
- settlement_date: The date when the bond is purchased (format: DATE function or serial number).
- maturity_date: The date when the bond matures (format: DATE function or serial number).
- frequency: The number of coupon payments per year (e.g., 1 for annual, 2 for semiannual, 4 for quarterly).
- basis: Optional. The day count basis to use (0 for US 30/360, 1 for Actual/Actual, 2 for Actual/360, 3 for Actual/365, 4 for European 30/360).
A string representing the number of days from the settlement date to the next coupon date.
If any input is invalid (e.g., incorrect date format, invalid frequency, or if the settlement date is on or after the maturity date), an error message is returned.
This function calculates the total number of days in the coupon period that contains the settlement date for a bond.
A comma-separated string of arguments. The format should be: settlement_date, maturity_date, frequency, [basis].
- settlement_date: The date when the bond is purchased (format: DATE function or serial number).
- maturity_date: The date when the bond matures (format: DATE function or serial number).
- frequency: The number of coupon payments per year (e.g., 1 for annual, 2 for semiannual, 4 for quarterly).
- basis: Optional. The day count basis to use (0 for US 30/360, 1 for Actual/Actual, 2 for Actual/360, 3 for Actual/365, 4 for European 30/360).
A string representing the total number of days in the coupon period that contains the settlement date. If any input
is invalid (e.g., incorrect date format, invalid frequency, or if the settlement date is on or after the maturity date),
an error message is returned.
This function calculates the number of coupons payable between the settlement date and the maturity date.
A string containing the input arguments separated by commas. The format should be: "settlement, maturity, frequency, [basis]"
-
settlement: The settlement date of the security, represented as a date string.
-
maturity: The maturity date of the security, represented as a date string.
-
frequency: The number of coupon payments per year (1 for annual, 2 for semi-annual, 4 for quarterly).
-
basis [optional]: The day count basis to use (0 = US (NASD) 30/360, 1 = Actual/actual, 2 = Actual/360, 3 = Actual/365, 4 = European 30/360). If omitted, the default is 0.
A string representing the number of coupons payable between the settlement date and maturity date, rounded up to the nearest whole coupon.
Returns an error message if the input arguments are invalid or if an error occurs during the calculation.
Check and parse the input arguments for Treasury bill formula.
This function computes the linear depreciation (AMORLINC) for an asset over each accounting period.
A comma-separated string containing the input arguments in the following format: "cost, datePurchased, firstPeriod, salvage, period, rate, [basis]".
-
cost: The initial cost of the asset.
-
datePurchased: The date the asset was purchased, provided in "yyyy-MM-dd" format.
-
firstPeriod: The end date of the first depreciation period, provided in "yyyy-MM-dd" format.
-
salvage: The expected salvage value of the asset at the end of its useful life.
-
period: The total number of periods over which the asset will be depreciated.
-
rate: The depreciation rate applied for each period.
-
basis [optional]: The day count basis to use
(0 = US (NASD) 30/360,
1 = Actual/actual,
2 = Actual/360,
3 = Actual/365,
4 = European 30/360).
If omitted, the default is 0.
A string representing the calculated depreciation for the specified period. If the input parameters are invalid, an error message is returned.
This function calculates the price discount of a security based on its settlement date, maturity date, discount rate, redemption value, and day count basis.
A comma-separated containing the input arguments in the format: "settlement, maturity, discount, redemption, [basis]"
-
settlement: The settlement date of the security, represented as a date string (yyyy-MM-dd) or serial number.
-
maturity: The maturity date of the security, represented as a date string (yyyy-MM-dd) or serial number.
-
discount: The discount rate of the security, represented as a decimal value (e.g., 0.05 for 5%). Must be greater than 0.
-
redemption: The redemption value of the security, represented as a decimal value. Must be greater than 0.
-
basis [optional]: The day count basis to use
(0 = US (NASD) 30/360,
1 = Actual/actual,
2 = Actual/360,
3 = Actual/365,
4 = European 30/360).
If omitted, the default is 0.
A string representing the calculated price discount. Returns an error message if the input arguments are invalid or if an error occurs during the calculation.
Parses and validates input arguments for both yield and price discount methods.
Input arguments as a string.
Array of parsed argument values.
The settlement date of the security.
The maturity date of the security.
Price or discount value, depending on the calculation.
The redemption value of the security.
The day count basis to use.
Indicates whether the method is calculating yield (true) or price (false).
Returns an error string if any issues are encountered; otherwise, returns an empty string.
Determine number of days between two dates based on the day count basis.
Get the year basis for day count.
This function calculates the price per $100 face value for a Treasury bill based on the settlement date, maturity date, and discount rate.
A comma-separated string containing the input arguments in the format: "settlement, maturity, discount".
-
settlement: The Treasury bill's settlement date in "yyyy-MM-dd" format.
This is the date the T-bill is purchased.
-
maturity: The Treasury bill's maturity date in "yyyy-MM-dd" format.
This is the date the T-bill matures, and the face value is repaid.
-
discount: The T-bill's discount rate expressed as a percentage
(e.g., 5.5 for 5.5%).
A string representing the calculated price per $100 face value for the Treasury bill
If input parameters are invalid or calculation errors occur, an error message will be returned.
This function calculates and returns the yield for a Treasury bill based on the settlement date, maturity date, and price per $100 face value.
A comma-separated string containing the input arguments in the format: "settlement, maturity, pr".
-
settlement: The settlement date of the Treasury bill in "yyyy-MM-dd" format.
This is the date on which the T-bill is purchased by the buyer.
-
maturity: The maturity date of the Treasury bill in "yyyy-MM-dd" format.
This is the date on which the T-bill expires and its face value is paid to the holder.
-
pr: The price of the Treasury bill per $100 face value, represented as a numeric value.
A string representing the calculated yield of the Treasury bill as a percentage.
If the input arguments are invalid or an error occurs during calculation, an appropriate error message is returned.
This function Computes and returns the price per $100 face value of a security that pays periodic interest.
A comma-separated string containing the numeric input values for which the price is to be calculated.
The format should be: "settlement, maturity, rate, yld, redemption, frequency, [basis]".
-
settlement: The settlement date of the security in "yyyy-MM-dd" format.
This is the date after the issue date when the security is traded to the buyer.
-
maturity: The maturity date of the security in "yyyy-MM-dd" format.
This is the date on which the security expires, and its face value is paid to the holder.
-
rate: The annual coupon rate of the security, represented as a decimal value
(e.g., 0.05 for 5%).
-
yld: The annual yield of the security, represented as a decimal value
(e.g., 0.04 for 4%).
-
redemption: The redemption value of the security per $100 face value, typically
represented as 100 or another numeric value.
-
frequency: The number of coupon payments per year. Use:
- 1 for annual payments
- 2 for semiannual payments
- 4 for quarterly payments
-
basis [optional]: The day-count basis to use for the calculation. Valid values are:
- 0 = US (NASD) 30/360 (default)
- 1 = Actual/Actual
- 2 = Actual/360
- 3 = Actual/365
- 4 = European 30/360
If omitted, the default is 0 (30/360).
A string representing the price per $100 face value of a security that pays periodic interest.
If the input values are invalid or if an error occurs during the calculation, an appropriate
error message is returned.
Parses and validates input arguments for yield and price calculations.
Extracts dates, rates, and other parameters, ensuring they meet the required constraints.
Returns an error message string if validation fails, or an empty string upon success.
Array of input argument strings.
Output: Annual coupon rate as a percentage.
Output: Price of the bond.
Output: Redemption value of the bond.
Output: Number of coupon payments per year (1, 2, or 4).
Output: Day count basis (0 to 4).
Output: Serial number representing the settlement date.
Output: Serial number representing the maturity date.
An empty string if validation succeeds, or an error message string if it fails.
Calculates the price of a bond when the number of coupons is greater than one.
Incorporates periodic coupon payments, discounting, and redemption value.
Number of days from the beginning of the coupon period to the settlement date.
Total number of days in the coupon period.
Annual coupon rate as a percentage.
Yield to maturity as a percentage.
Redemption value of the bond.
Number of coupon payments per year.
Number of remaining coupon payments.
The computed bond price.
Computes the power of a number with optimization for near-integer exponents.
Reduces computation time by checking if the exponent is close to an integer.
Base number.
Exponent value.
The computed power of the base number raised to the given exponent.
This function calculates the yield of a security that pays periodic interest.
A comma-separated string containing the input arguments in the format: "settlement, maturity, rate, price, redemption, frequency, [basis]".
-
settlement: The settlement date of the security, specified in "yyyy-MM-dd" format or as a serial number. This is the date when the security is traded to the buyer.
-
maturity: The maturity date of the security, specified in "yyyy-MM-dd" format or as a serial number. This is the date when the security expires, and its face value is paid to the holder.
-
rate: The annual coupon rate of the security, expressed as a decimal (e.g., 0.05 for 5%).
-
price: The price of the security per $100 face value, typically a numeric value.
-
redemption: The redemption value of the security per $100 face value, typically a numeric value.
-
frequency: The number of coupon payments per year. Acceptable values are:
- 1 for annual payments.
- 2 for semi-annual payments.
- 4 for quarterly payments.
-
basis (optional): The day count basis used for the calculation. Defaults to 0 (NASD 30/360). Acceptable values are:
- 0: NASD 30/360.
- 1: Actual/Actual.
- 2: Actual/360.
- 3: Actual/365.
- 4: European 30/360.
A string representing the calculated yield of the security as a percentage. If the input parameters are invalid, an error message is returned.
Calculates the yield for a bond with less than one coupon payment remaining.
The calculated yield.
Estimates the yield of a security using an iterative approach for cases with more than one coupon payment.
This function calculates the annual yield of a security that pays interest at maturity based on its settlement date, maturity date, issue date, coupon rate, price, and day count basis.
A comma-separated string containing the input arguments in the following format: "settlement, maturity, issue, rate, price, [basis]".
-
settlement: The settlement date of the security, specified in "yyyy-MM-dd" format or as a serial number. This is the date when the security is traded to the buyer.
-
maturity: The maturity date of the security, specified in "yyyy-MM-dd" format or as a serial number. This is the date when the security expires, and its face value is paid to the holder.
-
issue: The issue date of the security, specified in "yyyy-MM-dd" format or as a serial number. This is the date when the security is first issued.
-
rate: The annual coupon rate of the security, represented as a decimal value (e.g., 0.05 for 5%).This value must be greater than 0.
-
price: The price of the security per $100 face value. This value must be greater than 0.
-
basis [optional]: The day count basis to use for the calculation. Defaults to 0 (US NASD 30/360) if omitted. Acceptable values are:
(0 = US (NASD) 30/360,
1 = Actual/actual,
2 = Actual/360,
3 = Actual/365,
4 = European 30/360).
A string representing the calculated yield value at the maturity date. If the input arguments are invalid, an error message is returned.
This method parses the input arguments for YIELDMAT and PRICEMAT functions and extracts the required values.
Returns an error string if validation fails, or an empty string if successful.
Calculates the price of a security that pays interest at maturity, based on its settlement date, maturity date, issue date, coupon rate, yield, and day count basis.
A comma-separated string containing the input arguments in the following format: "settlement, maturity, issue, rate, yield, [basis]".
-
settlement: The settlement date of the security.
This is the date when the security is traded to the buyer.
It should be provided as a date string in "yyyy-MM-dd" format or as a serial number.
-
maturity: The maturity date of the security.
This is the date when the security expires, and its face value is paid to the holder.
It should be provided as a date string in "yyyy-MM-dd" format or as a serial number.
-
issue: The issue date of the security.
This is the date when the security was first issued.
It should be provided as a date string in "yyyy-MM-dd" format or as a serial number.
-
rate: The annual coupon rate of the security, represented as a decimal value (e.g., 0.05 for 5%).
This value must be greater than 0.
-
yield: The annual yield of the security, represented as a decimal value (e.g., 0.06 for 6%).
This value must be greater than 0.
-
basis [optional]: The day count basis to use for the calculation.
Defaults to 0 (US NASD 30/360) if omitted.
Acceptable values are:
- 0 = US (NASD) 30/360
- 1 = Actual/actual
- 2 = Actual/360
- 3 = Actual/365
- 4 = European 30/360
A string representing the calculated price of the security.
If the input arguments are invalid, an error message is returned.
This function calculates the yield discount of a security based on its settlement date, maturity date, price, redemption value, and day count basis.
A comma-separated string containing the input arguments in the following format: "settlement, maturity, price, redemption, [basis]".
-
settlement: The settlement date of the security.
This is the date when the security is traded to the buyer.
It should be provided as a date string in "yyyy-MM-dd" format or as a serial number.
-
maturity: The maturity date of the security.
This is the date when the security expires, and its face value is paid to the holder.
It should be provided as a date string in "yyyy-MM-dd" format or as a serial number.
-
price: The price of the security, represented as a decimal value per $100 face value.
This value must be greater than 0.
-
redemption: The redemption value of the security, represented as a decimal value per $100 face value.
This value must be greater than 0.
-
basis [optional]: The day count basis to use for the calculation.
Defaults to 0 (US NASD 30/360) if omitted.
Acceptable values are:
- 0 = US (NASD) 30/360
- 1 = Actual/actual
- 2 = Actual/360
- 3 = Actual/365
- 4 = European 30/360
A string representing the calculated annual yield discount. If the input arguments are invalid, an error message is returned.
This function calculates the Net Present Value (NPV) of a series of cash flows occurring at irregular intervals using a specified discount rate.
A comma-separated string of arguments in the format: rate, values, dates.
-
rate: The discount rate applied to the cash flows.It is used to discount future cash flows to their present value.
-
values: A series of cash flow amounts corresponding to the payment dates.
The first payment is optional and typically represents a cost or initial investment, and should be negative if it is a payment.
All subsequent payments are discounted based on a 365-day year.
The series must include at least one positive value (income) and one negative value (expense).
-
dates: A series of dates corresponding to the cash flow payments.
The first date represents the starting point of the cash flow schedule.Subsequent dates must occur after the first date, although they can be in any order..
Returns the calculated Net Present Value (NPV) as a string based on the provided discount rate, cash flows, and payment dates.
If an error occurs, such as invalid input format or mismatched values and dates, an error message is returned.
This method compute and return the Values and Dates array.If error string finds retrun error string.
Computes and populates a values array based on the provided input string.
If an error is encountered during processing, an error string is returned.
The input string to be processed.
A reference to a list where valid numeric values will be added.
A reference to a string where the error message will be set if the input string is invalid.
Computes and populates a values array based on the provided input string.
If an error is encountered during processing, an error string is returned.
The input string to be processed.
A reference to a list where valid numeric values will be added.
A reference to a string where the error message will be set if the input string is invalid.
This function calculates the price per $100 face value of a security that has an odd (short or long) last coupon period.
A comma-separated string containing the input arguments in the format:
"settlement, maturity, issue, rate, yld, redemption, frequency, [basis]".
-
settlement: The settlement date of the security, specified in "yyyy-MM-dd" format or as a serial number.
This is the date the buyer purchases the security.
-
maturity: The maturity date of the security, specified in "yyyy-MM-dd" format or as a serial number.
This is the date the security expires.
-
last_interest: The security's last coupon date, specified in "yyyy-MM-dd" format or as a serial number.
This is the date of the most recent coupon payment prior to the settlement date.
-
rate: The annual coupon rate of the security, expressed as a percentage (e.g., 5% is represented as 5.0).
-
yld: The annual yield of the security, expressed as a percentage (e.g., 5% is represented as 5.0).
-
redemption: The redemption value of the security per $100 face value.
Typically, this is 100 if the security is redeemed at par.
-
frequency: The number of coupon payments per year. Valid values are:
- 1: Annual payments.
- 2: Semi-annual payments.
- 4: Quarterly payments.
-
basis (optional): The day count basis for the calculation. Defaults to 0 (NASD 30/360). Valid values are:
- 0: NASD 30/360.
- 1: Actual/Actual.
- 2: Actual/360.
- 3: Actual/365.
- 4: European 30/360.
A string representing the calculated price of the security with an odd last period.
Returns an error message if the input parameters are invalid or if validation fails.
Parses and validates input arguments for the ODDLPRICE and ODDLYIELD functions.
A string containing the input arguments for ODDLPRICE or ODDLYIELD.
Returns an error message if validation fails, or an empty string if successful.
Calculates the non-negative day difference between two dates using a day count basis, with additional logic for day count convention.
The positive difference in days between start and end dates as a double.
Calculates the non-negative difference in days between two dates based on the specified day count basis.
The positive difference in days between start and end dates as a double.
This function calculates the yield of a security with an odd (short or long) last coupon period.
A comma-separated string containing the input arguments in the format:
"settlement, maturity, issue, rate, yld, redemption, frequency, [basis]".
-
settlement: The settlement date of the security, specified in "yyyy-MM-dd" format or as a serial number.
This is the date the buyer purchases the security.
-
maturity: The maturity date of the security, sepcified in "yyyy-MM-dd" format or as a serial number.
This is the date the security expires.
-
issue: The issue date of the security, sepcified in "yyyy-MM-dd" format or as a serial number.
This is the date the security was originally issued.
-
rate: The annual coupon rate of the security, expressed as a percentage (e.g., 5% is represented as 5.0).
-
pr: The price of the security per $100 face value, expressed as a percentage (e.g., a price of $95 is represented as 95.0).
-
redemption: The redemption value of the security per $100 face value.
Typically, this is 100 if the security is redeemed at par.
-
frequency: The number of coupon payments per year. Valid values are:
- 1: Annual payments.
- 2: Semi-annual payments.
- 4: Quarterly payments.
-
basis (optional): The day count basis for the calculation. Defaults to 0 (NASD 30/360). Valid values are:
- 0: NASD 30/360.
- 1: Actual/Actual.
- 2: Actual/360.
- 3: Actual/365.
- 4: European 30/360.
A string representing the computed yield of the security with an odd last period.
Returns an error message if the input parameters are invalid or if validation fails.
This function calculates the depreciation for an asset using the AMORDEGRC method, an accelerated depreciation approach.
The method applies a declining balance approach where the depreciation rate increases based on the asset's lifespan.
A comma-separated string containing the input arguments in the format: "cost, purchaseDate, firstPeriodEndDate, salvageValue, period, rate, [basis], [lifetime]".
-
cost: The initial cost of the asset.
-
purchaseDate: The date of purchase, sepcified in "yyyy-MM-dd" format or as a serial number.
-
firstPeriodEndDate: The end date of the first period, sepcified in "yyyy-MM-dd" format or as a serial number.
-
salvageValue: The salvage value of the asset at the end of its useful life.
-
period: The period for which depreciation is to be calculated (e.g., the number of years).
-
rate: The depreciation rate of the asset.
-
basis (optional): The day count basis to use for the calculation. Defaults to 0 (NASD 30/360). Acceptable values are:
- 0: NASD 30/360.
- 1: Actual/Actual.
- 2: Actual/360.
- 3: Actual/365.
- 4: European 30/360.
-
lifetime (optional): The total lifetime of the asset in periods. If omitted, it defaults to the standard asset lifetime.
A formatted string containing the calculated depreciation value for the specified period. If the input parameters are invalid, an error message is returned.
Performs the AMORDEGRC depreciation calculation for an asset based on cost, dates, salvage value, depreciation period, and rate.
String representation of the calculated depreciation amount.
Determines the depreciation coefficient based on the asset's lifetime.
Depreciation coefficient as a multiplier (1.0, 1.5, 2.0, or 2.5).
Adjusts the date to ensure proper handling of the first period depreciation based on the day count basis.
The adjusted date.
Calculates the AMORDEGRC depreciation for a given period.
The depreciation value for the specified period.
This function calculates the price per $100 face value of a security with an odd first period
A comma-separated string containing the input arguments in the format:
"settlement, maturity, issue, first_coupon, rate, yld, redemption, frequency, [basis]".
-
settlement: The settlement date of the security, in "yyyy-MM-dd" format or as a serial number.
-
maturity: The maturity date of the security, in "yyyy-MM-dd" format or as a serial number.
-
issue: The issue date of the security, in "yyyy-MM-dd" format or as a serial number.
-
first_coupon: The date of the first coupon payment, in "yyyy-MM-dd" format or as a serial number.
-
rate: The annual coupon rate of the security.
-
yld: The annual yield of the security.
-
redemption: The redemption value of the security per $100 face value.
-
frequency: The number of coupon payments per year. Acceptable values are:
- 1 for annual payments.
- 2 for semi-annual payments.
- 4 for quarterly payments.
-
basis (optional): The day count basis to use for the calculation. Defaults to 0 (NASD 30/360). Acceptable values are:
- 0: NASD 30/360.
- 1: Actual/Actual.
- 2: Actual/360.
- 3: Actual/365.
- 4: European 30/360.
A formatted string of the calculated price of the security with an odd first period. If the input parameters are invalid, an error message is returned.
Parses and validates input arguments for the ODDFPRICE and ODDFYIELD formulae.
Calculates the odd first coupon price for a bond based on the given parameters.
Calculates the adjustment factors for the odd first coupon period in a bond price calculation.
A function that calculates cumulative adjustment values for principal and interest components.
Aggregates values over a specified range, applying a collector function to accumulate results.
An array containing the accumulated results.
Calculates an aggregated result by applying a specified function to a range of integers,
accumulating the result as a double value. The function iterates from the specified start to end values,
using a seed value as the initial result and aggregating using the provided collector function.
The final accumulated result as a double after applying the collector function across the specified range.
Generates a sequence of integers between a specified start and end, inclusive.
An IEnumerable containing integers from start to end.
Calculates the number of coupon periods between two dates based on the specified interval in months.
The number of coupon periods between startDate and endDate.
This function calculates the yield of a security that has an odd (short or long) first period.
A comma-separated string containing the input arguments in the format: "settlement, maturity, issue, first_coupon, rate, yld, redemption, frequency, [basis]".
-
settlement: The settlement date of the security, in the provided format "yyyy-MM-dd" or as a serial number.
-
maturity: The maturity date of the security, in the provided format "yyyy-MM-dd" or as a serial number.
-
issue: The issue date of the security, in the provided format "yyyy-MM-dd" or as a serial number.
-
first_coupon: The date of the first coupon payment, in the provided format "yyyy-MM-dd" or as a serial number.
-
rate: The annual coupon rate of the security.
-
pr: The annual price of the security.
-
redemption: The redemption value of the security per $100 face value.
-
frequency: The number of coupon payments per year. Acceptable values are:
- 1 for annual payments.
- 2 for semi-annual payments.
- 4 for quarterly payments.
-
basis (optional): The day count basis to use for the calculation. Defaults to 0 (NASD 30/360). Acceptable values are:
- 0: NASD 30/360.
- 1: Actual/Actual.
- 2: Actual/360.
- 3: Actual/365.
- 4: European 30/360.
A formatted string of the calculated yield of the security with an odd first period. If the input parameters are invalid, an error message is returned.
Finds the root of a function using a combination of Newton's and Bisection methods.
Determines bounds that contain a root of the given function by expanding outward from an initial guess.
this function used to obtain the address of a cell in a worksheet, given specified row and column numbers
The argList contain the row and column postion and type of reference
Address of the given row and column
Return the information about cell
content, reference
Cell information
Returns the current operation environment information
Type
environment information
Returns the interger value for the datatype of given text
text
integer value
Return the value of ComputeIsFormula
arguments
Returns a horizontal table look up value.
Contains search value, table, return index and match properties.
Matching value found in the table.
For example, =HLOOKUP("Axles",A1:C4,2,TRUE) looks for the exact
match for Axles in A1:C1 and returns the corresponding value in A2:C2.
Finds the index a specified value in a lookup_range.
look_value, lookup_range, match_type
The relative index of the lookup_value in the lookup_range.
Lookup_range should be a either a single row range or a single column range.
If match_type is 0, the relative index of the first exact match (ignoring case)
in the specified range is returned. If match_type is 1, the values in the range
should be in ascending order, and the index of the largest value less than or
equal to the lookup_value is returned. If match_type is -1, the values in the range
should be in descending order, and the index of the smallest value greater than or
equal to the lookup_value is returned.
Below method is used to returns the cellrange while the lookup vector is cellrange and result vector is cell(eg:=LOOKUP(2,D7:I7,A1)).
lookup vectors value.
result vectors value.
The default value is false.True when the resultant vector range from GetResultRange is modified.
Returns the cellrange of result vector.
Calculate multiple range lookup with logical operators and retruns calculated lookup range.
Calculated lookup range
Returns a value from result table either from a one-row or one-column range or from an array
Lookup Value, lookup range, result range
Matching value found in the table
To get the result value of lookup formula.
ResultVector cell range.
lookup value
Set to true if the resultant vector range from is modified or not.
column index.
lookup arguments list.
lookup vector list
Returns the result value of lookup formula.
Returns true Matching value found in the lookup otherwise false.
>Contains search value
The value you want to look up.
Returns a vertical table look up value.
Contains search value, table, return index and match properties.
Matching value found in the table.
For example, =VLOOKUP("Axles",A1:C4,2,TRUE) looks for the exact
match for Axles in A1:A4 and returns the corresponding value in B1:B4.
Returns the left so many characters in the given string.
Contains the string and the number of characters.
A left sub string..
Returns the length of the given string.
Contains the string.
An integer length.
Returns a substring of the given string.
Contains the original string, start position of the substring,
and the number of characters in the substring.
A substring.
Returns the right so many characters in the given string.
Contains the string and the number of characters.
A right substring.
Returns True if the ParseArgumentSeparator character is included in a string.
The string to be searched.
True or False.
Returns an array of strings from an argument list.
A delimited argument list.
Array of strings from an argument list.
Returns a single character string.
List of strings to be concatenated.
A single string.
Returns the reference specified by a text string. References are immediately evaluated to display their contents.
Syntax: INDIRECT(CellRefString, [IsA1Style])
Cell reference string.
Cell reference.
Replaces the old text with new in text based on matching.
Text to be changed.
Text to replace.
Text to be replaced with old_text
The instance to replace
In a given string, this method substitutes an occurrence of one string with another string.
A list of 3 or 4 arguments: the original string, the search string, the
replacement string, and optionally, an integer representing the occurrence to be replaced.
The modified string.
Returns a quoted string from a date or number.
Value to be converted to a string.
Quoted string.
The TEXTJOIN function combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined. If the delimiter is an empty text string, this function will effectively concatenate the ranges.
A text string, or array of strings, such as a range of cells.
A single string.
The CONCAT function combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments.
Text item to be joined. A string, or array of strings, such as a range of cells.
A single string.
Returns a number.
A date or number string.
A number in the given string.
Returns the remainder after dividing one number by another.
Two numbers in a list.
The remainder.
Truncates a number to an integer.
Value and number of digits.
Truncated value.
To Peroform arithmetic operations of range.
To Peroform SumProduct default arithmetic operations.
values of Array
Sum of the products.
Returns the sum of the products of corresponding values.
Two cell ranges.
Sum of the products.
Converts a number to text using currency format.
Number and the number of digits.
Currency format string.
Rounds a number to the specified number of decimals, formats the number
in decimal format using a period and commas, and return the result as text.
Number, number of digits, a flag that prevents from include
commas in the returned text.
Formatted number as string.
Returns the value at the specified index from a list of values.
A string of the form "Index, Value1, Value2,..." in which the term 'Index' denotes the index of the value to be retrieved.
The selected value.
Converts text to lowercase.
Value to convert.
Converted string.
Converts text to uppercase.
Value to convert.
Converted string.
Returns the string or text referred by the given value.
value to find the referred text - Required
Returns the referred text
Returns the column index of the passed in cell reference.
Contains zero or one argument. If no argument is passed, returns the column index of the
location of this Column function call, otherwise returns the column index of the passed in cell reference.
The column index.
Returns the row index of the passed in cell reference.
Contains zero or one argument. If no argument is passed, returns the row index of the
location of this Row function cell, otherwise returns the row index of the passed in cell reference.
The row index.
This method doesn't return an array of row numbers as the array formula entry is not supported in engine. It is another usecase of this library function.
Returns a number converted from the provided value.
Value to be converted.
A number in string format or an error string.
Returns the error value(#N/A). Used internally.
empty string.
error value.
Returns the error value (#N/A - value not available).
error value.
Returns a number corresponding to the predefined error values(#NULL!, #VALUE!, #REF!, #NAME?, #NUM!, #N/A, "#GETTING_DATA). Returns #N/A if not or any value enclosed within double quotes.
Removes all leading and trailing white-space characters.
Value to trim.
The string that remains after all leading and trailing white-space characters
were removed.
Determines whether the value is a logical value.
Value to be tested.
True if the value is a logical value, False otherwise.
Determines whether the value is the #NA error value.
Value to be tested.
True if the value is the #NA error value, False otherwise.
Returns True is the string denotes an error except #N/A.
Value to be tested.
True if the value is an error except #N/A, false otherwise.
Determines whether the value is empty string.
Value to be tested.
True if the value is empty, False otherwise.
Determines whether the value is string or not.
Value to be tested.
True if the value is a string, false otherwise.
Determines whether the value is not a string.
Value to be tested.
True if the value is not a string, false otherwise.
Returns True is the string denotes an error.
String to be tested.
True if the value is an error.
Checks whether the value is a reference or not.
value or reference
TRUE or FALSE
Returns the And of all values treated as logical values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers. Each item in the list is considered True if it is nonzero
and False if it is zero.
A string holding the And of all values listed in the argument.
The IFS function checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition. IFS can take the place of multiple nested IF statements, and is much easier to read with multiple conditions.
A string holding [Something is True1, Value if True1, [Something is True2, Value if True2],…[Something is True127, Value if True127]
Returns a value that corresponds to the first TRUE condition
The SWITCH function evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned.
A string holding expression, value1, result1, [default or value2, result2],…[default or value3, result3]
Returns the result corresponding to the first matching value
Returns the inclusive Or of all values treated as logical values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers. Each item in the list is considered True if it is nonzero
and False if it is zero.
A string holding the Or of all values listed in the argument.
Flips the logical value represented by the argument.
The argument is
treated as a logical expression with a non-zero value considered True and a zero value considered False.
A string holding either a single argument consisting of a
cell reference, formula, or number.
Returns 0 if the argument evaluates to a non-zero value. Otherwise, it returns 1.
Returns a range that is the offset of the reference range by rows and cols.
reference, rows, cols, [height], [width]
A range offset.
The returned range is the range passed in through the reference variable offset
by the number of rows in the rows variable and number of columns in the cols variable. If height and
width are present in the argument list, they determine the number of rows and columns
in the returned range. Otherwise, the dimensions of the returned range match the input range.
Returns the logical value True.
Empty string.
Logical True value string.
Returns the logical value False.
Empty string.
Logical False value string.
Returns the exclusive OR of all values treated as logical values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers. Each item in the list is considered True if it is nonzero
and False if it is zero.
A string holding the exclusive OR of all values listed in the argument.
Returns a value you specify if a formula evaluates to #N/A
otherwise, returns the result of the formula.
String to be tested.
Returns the computed value.
Computes angle whose cosine is the argument.
A cell reference, formula, or number.
A string holding an angle whose cosine is the argument.
Returns the Arabic value of Raman numeric
Returns the area of the passed in cell reference range
Contains one argument - reference
area of the passed in cell reference.
Computes angle whose sine is the argument.
A cell reference, formula, or number.
A string holding an angle whose sine is the argument.
The inverse of Sinh.
The given value.
Result of ASinh(value).
Computes angle whose tangent is the argument.
A cell reference, formula, or number.
A string holding the tangent of the argument.
The ArcTangent of the x and y values.
x_value and y_value.
Angle whose tangent is y_value/x_value.
The inverse of Tanh.
|Value| < 1.
Result of ATanh(value).
Computes the smallest whole number greater than or equal to the argument.
A cell reference, formula, or number.
A string holding the smallest whole number greater than or equal to the argument.
Returns the RoundUp of the given number to the given significance
Number, significance, mode
RoundUp number
Returns the number of columns of the passed in cell reference.
Contains one argument - reference
number of columns.
The number of combinations of a given number of items.
Number, number_items.
The number of combinations.
Returns the value of ComputeCombinA
arguments
Computes the natural logarithm of the value in the argument.
A cell reference, formula, or number.
A string holding the natural logarithm of the value in the argument.
Computes the base 10 logarithm of the value in the argument.
A cell reference, formula, or number.
A string holding the base 10 logarithm of the value in the argument.
Computes e raised to the value of the argument.
A cell reference, formula, or number.
A string holding the e raised to the value of the argument.
Returns the square root of product of given number with PI.
Number
Sqrtpi value of given number
Computes the square root of the argument.
A cell reference, formula, or number.
A string holding the square root of the argument.
Computes the absolute value of the argument.
A cell reference, formula, or number.
A string holding the absolute value of the argument.
Computes the cosine of the argument.
A cell reference, formula, or number.
A string holding the cosine of the argument.
The inverse of Cosh.
Value >= 1.
Result of ACosh(value).
Returns an evenly distributed random number >= 0 and < 1.
Ignored. Can be empty.
A string holding the random number.
Computes the tangent the argument.
A cell reference, formula, or number.
A string holding the tangent of the argument.
Computes the hyperbolic tangent of the argument.
A cell reference, formula, or number.
A string holding the hyperbolic tangent of the argument.
Checks if value of S mets the Criteria or Not.
Operator
Cell
The String value to be compared
True if Value of S equals Criteria Otherwise False
Checks if value of S mets the Criteria or Not.
Operator
Cell
The double value to be compare
True if Value of S mets Criteria Otherwise returns False
Sums the cells specified by some criteria.
The criteria range, the criteria, and the sum range.
A string holding the sum.
Below method used to find the row,col index when the start row or start column is -1.
Start row of the range.
End row of the range.
Start column of the range.
End column of the range.
Used to compute the value
arguments
Returns the arccotangent of a number.
A cell reference or number
A string containing the arccotangent of a number
Returns the hyperbolic arccotangent of a number.
A cell reference or number
A string containing the hyperbolic arccotangent of a number
Returns the archyperbolic secant of an angle.
A cell reference or a number
A string containing the archyperbolic secant of an angle
Retuns the number into text for the given radix base
Computes the hyperbolic cosine of the argument.
A cell reference, formula, or number.
A string holding the hyperbolic cosine of the argument.
Returns the hyperbolic cosine of a number.
A cell reference or a number
A string containing the hyperbolic cosine of a number
Returns the cotangent of an angle.
A cell reference or a number
A string containing the cotangent of an angle
Returns the cosecant of an angle
a cell reference or number
A string containing the cosecant of an angle
Returns the hyperbolic cosecant of an angle.
A string containing the hyperbolic cosecant of an angle
Returns the decimal number of the given text to the given base.
text,base
Decimal number.
Converts radians into degrees.
Value in radians.
Degrees for the given radians.
Rounds up to larger in magnitude even number.
Number to be rounded.
Rounded even value.
Factorial of a given number.
The given value, x.
Factorial of x.
Returns the Double factorial value for given number.
number to find FactDouble
FactDouble of given number.
Computes the largest whole number less than or equal to the argument.
A cell reference, formula, or number.
A string holding the largest whole number less than or equal to the argument.
Returns the Calculated Floor value for the given Input.
Return the value of ComputeFormulaText
arguments
Returns the largest integer that divide the given numbers without any reminders.
number1,number2,...
Returns the GCD value of given arguments
Create a shortcut for the link / path
link,name
shortcut name
Returns the integer value.
Number to be truncated.
An integer.
Determines whether the value is even or not.
Value to be tested.
True, if the value is even, false otherwise.
Determines whether the string contains a number or not.
String to be tested.
True if the string is a number.
Determines whether the value is odd or not.
Value to be tested.
True, if the value is odd, false otherwise.
returns the smallest positive integer that is a multiple of all given values.
Number1,Number2,...
The LCM value of given aruments
Computes the natural logarithm of the value in the argument.
A cell reference, formula, or number.
A string holding the natural logarithm of the value in the argument.
Returns the number of columns of the passed in cell reference.
Contains one argument - reference
number of columns.
Returns the Inverse of Matrix.
Matrix
Inverse matrix
Returns the number of columns of the passed in cell reference.
Contains one argument - reference
number of columns.
Returns the number of columns of the passed in cell reference.
Contains one argument - reference
number of columns.
Determines the number rounded to the given multiple.
Number, Multible both are required
Mround value of given number
Determines the Multinominal value of given range of numbers.
Given numbers
Multinominal value of given range of numbers.
Returns the number of columns of the passed in cell reference.
Contains one argument - reference
number of columns.
Rounds up to larger in magnitude odd number.
Number to be rounded.
Rounded odd value.
Returns the number pi.
Ignored. Can be empty.
A string holding the number pi.
Returns a specified number raised to the specified power.
String containing two parameters separated by commas:
the first being base number,
the second being the exponent.
A string holding the value of the base number raised to the exponent.
Returns the product of the arguments in the list.
List of arguments.
Product of the arguments.
Returns the integer portion of division function.
numerator, denominator to find the quotient
returns integer value.
Converts degrees into radians.
Value in degrees.
Radians for the given degrees.
Returns the arabic numeral to roman in TEXT format
Number, Form for style of roman text.
0 or omitted Classic.
1 More concise.
2 More concise.
3 More concise.
4 Simplified.
TRUE Classic.
FALSE Simplified.
Retuns the Roman string of given numeric value based on the style form
Rounds a number to a specified number of digits.
Number and number of digits.
Rounded number.
Rounds a number to a specified number of digits.
Number and number of digits.
Rounded number.
Rounds a number to a specified number of digits.
Number and number of digits.
Rounded number.
Returns the number of rows of the passed in cell reference.
Contains one argument.
number of rows.
Returns the secant of an angle.
A cell reference, or number.
A string conaining the secant of an angle
Returns the hyperbolic secant of an angle.
A cell reference, or number
A string containing the hyperbolic secant of an angle.
return the sheet number of the given value
SheetName or cell or named range
sheet number
return the sheet number of the given values
SheetName or cell or named range
sheet number
Returns a number indicating the sign of the argument.
A cell reference, formula, or number.
A string holding a number representing the sign of the argument.
Computes the sine of the argument.
A cell reference, formula, or number.
A string holding the sine of the argument.
Computes the hyperbolic sine of the argument.
A cell reference, formula, or number.
A string holding the hyperbolic sine of the argument.
Returns the sum of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the sum of all values listed in the argument.
Returns the sum of all the cells in a range which is statisfy the given multible criteria
range of cells, criteria1, average_range1,...
returns the sum value of the cells.
Returns the sum of the square of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the sum of the squares of all values listed in the argument.
Returns the sum of the differences of squares of the two ranges.
x_range and y_range.
A string holding sum of the differences of squares.
Returns the sum of the sums of squares of the two ranges.
x_range and y_range.
A string holding sum of the sums of squares.
Returns the sum of the squares of the differences between two ranges.
x_range and y_range.
A string holding sum of the squares of the differences.
Returns the vertical range of cells as a horizontal range, or vice versa
Cell refrences
value
Returns the value of computeTruncate
arguments
Returns a random integer number between the specified two numbers.
StartNumber, EndNumber
Random numberbetween two value
Return the value of ComputeSeriessum
arguments
Searches a range or an array, and then returns the item corresponding to the first match it finds.
If no match exists, then XLOOKUP can return the closest (approximate) match.
A string containing the arguments separated by commas.
The format should be: "lookup_value, lookup_array, return_array, if_not_found, match_mode, search_mode".
- lookup_value: The value to search for.
- lookup_array: The array or range of cells to search within.
- return_array: The array or range of cells from which to return a value.
- if_not_found: The value to return if no match is found.
-
match_mode: [Optional] The match type (default is 0):
- 0 for exact match (default)
- -1 for exact match or next smaller item
- 1 for exact match or next larger item
- 2 for wildcard match
-
search_mode: [Optional] The search mode (default is 1):
- 1 for search from first to last (default)
- -1 for search from last to first
- 2 for binary search ascending
- -2 for binary search descending
The item corresponding to the first match it finds. If no match exists, then XLOOKUP can return the closest (approximate) match.
Calculate and retrun the matched value based on match mode and search mode
The value to search
The range or array where to search.
The range or array from which to return values.
The value to return if no match is found. If omitted, an #N/A error is returned.
The match type to perform:
The direction of search
The matched value
Returns the range of cells as an array by scanning column wise
cell range
array of cells
Convert multi criteria lookup range to single range
multicriteria lookup range
return calculated lookup range
Match the lookup value and return the index based on match mode
the matched index
Calculate and get the matchMode value from the argument
argument
the matchMode value
Calculate and get the SearchMode value from the argument
argument
the SearchMode value
Validate argument type for the possible cases for error string
argument
>The formula's argument typ
Returns the relative position of an item in an array or range of cells.
A string containing the arguments separated by commas.
The format should be: "lookup_value,lookup_array,match_mode,search_mode".
- lookup_value: The value to search for.
- lookup_array: The array or range of cells to search within, provided as a comma-separated string of values.
-
match_mode: [Optional] The match type (default is 0):
- 0 for exact match (default)
- -1 for exact match or next smallest item
- 1 for exact match or next largest item
- 2 for wildcard match
-
search_mode: [Optional] The search mode (default is 1):
- 1 for search from first to last (default)
- -1 for search from last to first
- 2 for binary search ascending
- -2 for binary search descending
The relative position of an item in an array or range of cells.
Sort the lookup array in DescendingOrder
the array in DescendingOrder
Sort the lookup array in AscendingOrder
the array in AscendingOrder
Match the lookup value and return the index based on match mode
the matched index
check and match the lookup value when its contains "?"
TTrue when match or false
Rounds a number down to the nearest integer or to the nearest multiple of significance.
A string containing the arguments separated by commas.
The format should be: "number, significance, mode".
-
number: The number to be rounded down.
-
significance: [optional] The multiple to which you want to round.
-
mode: [optional] The direction (toward or away from 0) to round negative numbers.
A number rounded down to the nearest integer or to the nearest multiple of significance.
Validate and retrun the argument as double value.
Calculate array format argument value.
Return calculated array format argument value for interior and direct FloorMath formula
convert string values(number,sign,mode) to double value
convert string values(number,sign) to double value
Calculated FloorMath value for the given Input.
Return round a number down to the nearest integer or to the nearest multiple of significance.
Computes and returns a number that is rounded down to the nearest integer or to the nearest multiple of significance.
A string containing the arguments separated by commas.
The format should be: "number, significance".
-
number: The value to be rounded.
-
significance: [optional] The multiple to which the number is to be rounded.
A number that is rounded down to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded down. However, if the number or the significance is zero, zero is returned.
Returns the Calculated FloorPrecise value for the given Input.
Returns the Calculated CeilingPrecise value for the given Input.
Calculate array format argument value.
Return calculated array format argument value for interior and direct FloorPrecise formula.
Calculate array format argument value.
calculated array format argument value for interior and direct IsoCeiling formula.
Calculate array format argument value.
calculated array format argument value for interior and direct CeilingPrecise formula.
Computes and returns a number that is rounded up to the nearest integer or to the nearest multiple of significance.
A string containing the arguments separated by commas.
The format should be: "number, significance".
-
number: The value to be rounded.
-
significance: [optional] The multiple to which the number is to be rounded. The default value is 1.
A number that is rounded up to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded up. However, if the number or the significance is zero, zero is returned. This follows the ISO 8601 standard.
Computes and returns a number that is rounded up to the nearest integer or to the nearest multiple of significance.
A string containing the arguments separated by commas.
The format should be: "number, significance".
-
number: The value to be rounded.
-
significance: [optional] The multiple to which the number is to be rounded. The default value is 1.
A number that is rounded up to the nearest integer or to the nearest multiple of significance. Regardless of the sign of the number, the number is rounded up. However, if the number or the significance is zero, zero is returned.
This function appends arrays vertically and in sequence to return a larger array.
A string containing the arguments separated by commas.
The format should be: "array1,[array2],..."
- array1, array2, ...: The arrays to append.
A single array that has as many columns as all of the source arrays combined and as many rows as the tallest of the source arrays.
This function appends arrays horizontally and in sequence to return a larger array.
A string containing the arguments separated by commas.
The format should be: "array1,[array2],..."
- array1, array2, ...: The arrays to append.
A single array that has as many columns as all of the source arrays combined and as many rows as the tallest of the source arrays.
Validate the argument for VStack and HStack formula and return array list.
Compute and return appended array as string value for VStack and HStack formula.
Compute and append array vertically and return array as string value.
Compute and append array horizontally and return array as string value.
This function computes and returns the value of the density function for a standard normal distribution.
A string representing the numeric input for which PHI is to be calculated.
A formatted string representing the calculated PHI value.
If the input is invalid, an error message is returned indicating the type of error.
This function converts a specified monetary amount from one currency to another using predefined Euro conversion rates.
The Euro is used as an intermediary currency for conversions between non-Euro currencies.
A comma-separated string containing the input arguments in the format:
"amount, sourceCurrency, targetCurrency, [fullPrecision], [triangulationPrecision]".
-
amount: The numeric value to be converted.
This value must be a valid floating-point number.
-
sourceCurrency: The three-character ISO currency code for the source currency.
This must represent a valid currency included in the predefined Euro conversion table.
-
targetCurrency: The three-character ISO currency code for the target currency.
This must represent a valid currency included in the predefined Euro conversion table.
-
fullPrecision (optional): A boolean value indicating whether the result should use full precision.
If omitted, the default value is false, meaning the result will be rounded.
-
triangulationPrecision (optional): An integer specifying the precision for intermediate Euro calculations.
If omitted, the default value is 3. Values less than 3 are invalid.
A string representing the converted amount in the target currency. If the input parameters are invalid, an error message is returned.
Converts a given monetary amount from one currency to another using predefined Euro conversion rates.
The converted monetary amount as double value.
If the conversion is invalid (e.g., unsupported currency codes), the method returns double.NaN.
A property that gets/sets the current named ranges.
Adds a named range to the NamedRanges collection.
The name of the range to be added.
The range to be added.
True if successfully added, otherwise False.
The range should be a string such as A4:C8.
Removes a range from the NamedRanges collection.
The name of the range to be removed.
True if successfully removed, otherwise False.
Replaces NamedRanges with their values.
Accepts a string such as Sin(SumRange) and tokenizes it into
bqSIN[A1A4a]b which serves as input to ComputedValue.
argList containing named ranges.
Get the cell Range for table NameRange
Formula or NamedRange
cell range string
Get the first row Index of Cell Range
Cell Range to find index
get the top row index
This method is used to check the given text is Namedrange or not.
Parsed string.
returns the CellRange value if the parsed text is NamedRange
Below method used to intersect the NamedRanges when the parsed formula contains space.
A string holding a valid parsed formula.
The intersected NamedRanges value.
If the namerange intersects, returns true, else false.
Find the next table formula or table Range end index i.e last index of '['
formula to find index
location of start index to search the char '['
locatio of end index
Returns the sample covariance between two arrays.
Arrays should be of equal length, and contain more than one element.
Returns the mean of an array.
Array of data for which we are calculating the mean.
Returns the mean of an array.
Array of data for which we are calculating the mean. For time series, the last element (index = n-1), is the most recent.
In most applications, the decay factor is between 0 and 1. Weigth on the last element in array is 1.0, the 2nd to last element d, 3rd to last d^2, ...
Returns the inverse of the sum of a geometric series of length n, who's first element is 1.
For decay factor d, S = 1 + d + d^2 + ... + d^(n-1). Return 1/S.
Decay factor Typically between -1 adn +1.
Number of elements in the geometric series, must be positive.
Calculates the natural logarithm of gamma function.
Returns the average deviation of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the average deviation of all values listed in the argument.
Returns the simple average of all values (including text) listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the simple average of all values listed in the argument.
Returns the average of all the cells in a range which is statisfy the given multible criteria
range of cells, criteria1, average_range1,...
returns the average value of the cells.
Below method used to find the criteria value which is combined with tokens.
Criteria value with tokens.
Tokens
The criteria value splited from tokens.
Below method used to find whether the criteria is matched with the Tokens "=",">",">=" or not.
CellRange
Tokens("=",">",">=")
The criteria used to determine which cells to add.
true criteria match or false.
Returns the chi-squared distribution.
x, degrees of freedom.
The chi-squared distribution.
Returns the growth estimate using the exponential curve y = b * m^x that best fits the given points. Only the first two Excel parameters are used.
Y_range, x_range.
returns estimated value.
Returns the m and b value used in exponential curve y = b * m^x.
The set of y-values required in y = b*m^x
The set of x-values in y = b*m^x
output of b
output of m
returns calculated b value.
Returns the natural logarithm of the gamma function.
The value to be evaluated.
The natural logarithm of the gamma function.
Calculates the statistics for a straight line that explains the relationship between the independent variable and one or more dependent variables
Parsed range.
an array describing the line. The function uses the least squares method to find the best fit for your data.
Returns the inverse of the chi-squared distribution.
x, degrees of freedom.
The inverse of the chi-squared distribution.
Returns the Chi Test for independence.
Actual_range, expected_range.
Result of Chi Test: y-intercept.
Returns the normal distribution.
x, mean, standarddev, cumulative.
The normal distribution.
Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function. The distribution value
is computed interactively using Trapezoidal Rule to six to seven significant digits
or 20 iteration maximum.
Returns the standard normal cumulative distribution function. The distribution has a mean of 0 (zero) and a standard deviation of one.
Syntax: NORMSDIST(z)
Z is the value for which you want the distribution.
Standard normal cumulative distribution.
Returns the inverse of normal distribution.
P, mean, standard deviation.
Returns x such that normal distribution at x is p.
P should be between 0 and 1.
Enabled only when ExcelLikeComputations property is set to true.
Computes the inverse normal cumulative distribution for the given probability.
probability
a double value.
Returns the inverse of the standard normal cumulative distribution. The distribution has a mean of zero and a standard deviation of one.
Syntax: NORMSINV(p)
p is a probability corresponding to the normal distribution.
Inverse of standard normal cumulative distribution.
p should be between 0 and 1.
Returns a confidence interval radius.
Alpha, standard deviation, size.
Returns x such that normal distribution at x is p.
P should be between 0 and 1.
Returns the correlation coefficient of the two sets of points.
range1, range2.
Correlation coefficient.
Returns the count of all values (including text) listed in the argument to
evaluate to a number.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the count of all numerical values listed in the argument.
Returns the count of all values (including text) listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the count of all values listed in the argument.
Returns the count of blank cells listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the count of blank cells listed in the argument.
Counts the cells specified by some criteria.
The criteria range, the criteria.
Number of cells meeting the criteria.
Calculates the CountIF and CountIFS formula
The criteria range, the criteria
If true, calculate CountIF formula. Else calculate CountIFS formula.
Number of cells meeting the criteria.
The COUNTIFS function applies criteria to cells across multiple ranges and counts the number of times all criteria are met.
The criteria range, the criteria.
Number of cells meeting the criteria
Returns the covariance between the two sets of points.
range1, range2.
The covariance.
Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value.
Number of trials, probability, alpha.
Returns the critical value.
Returns the exponential distribution.
x, lambda, cumulative.
The exponential distribution.
Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function.
Returns the F (Fisher) probability distribution.
x, degreesfreedom1, degreesfreedom2.
Returns the F probability distribution.
Returns the inverse of F distribution.
p, degreesfreedom1, degreesfreedom2.
Returns x such that F distribution at x is p.
P should be between 0 and 1.
Returns the Fisher transformation of the input variable.
Input variable x.
Fisher transformation of x.
X should be between -1 and 1.
Returns the inverse of Fisher transformation.
Input variable y.
The value x such that the Fisher transformation y is x.
Returns a forecasted value based on two sets of points using least square fit regression.
x, rangex, rangey.
Forecasted value.
Returns the kurtosis of the passed in values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The kurtosis of the data.
Returns the Kth largest value in the range.
range, k.
Kth largest value.
Returns the lognormal distribution.
x, mean, standarddev.
The lognormal distribution.
Returns the inverse of the lognormal distribution.
p, mean, standarddev.
Returns the value x where the lognormal distribution of x is p.
Returns the maximum value of all values listed in the argument including logical values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the maximum value of all values listed in the argument.
True is treated as 1; False is treated as 0.
Returns the median value in the range.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
Median value.
Returns the minimum value of all values listed in the argument including logical values.
A string holding a list (separated by commas) of:
cell references,
formulas, or numbers.
A string holding the minimum value of all values listed in the argument.
True is treated as 1; False is treated as 0.
Returns the most frequent value in the range.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The most frequent value.
Returns the negative binomial distribution.
Number of failures, success threshold, probability, cumulative.
The negative binomial distribution.
Returns the Pearson product moment correlation coefficient.
Range1, range2.
Pearson product.
Returns the percentile position in the range.
Range, k.
Percentile position.
K is a value between 0 and 1.
Returns the percentile position in the ranges.
This method used only for contional formatting to calculate the percentile value.
When the argument contains more no of cell reference.
Ranges, k.
Percentile position.
K is a value between 0 and 1.
Returns the percentage rank in the range.
Range, x, significant digits.
Percentile position.
Significant digits are optional, defaulting to 3.
The number of permutations of n items taken k at the time.
n, k
The number of combinations.
Returns the Poisson distribution.
x, mean, cumulative
Returns the exponential distribution.
Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function.
Returns the probability that a value in the given range occurs.
xrange1, prange2, lowerbound, upperbound.
The probability.
Returns the quartile position in the range.
Range, q.
Percentile position.
Q is 0, 1, 2, 3, 4.
Returns the rank of x in the range.
X, range, order.
Rank of x.
Returns the square of the Pearson product moment correlation coefficient.
Range1, range2.
Square of the Pearson product.
Returns the skewness of a distribution.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
Skewness of a distribution.
Returns the slope of the least square fit line through the given points.
Y_range, x_range.
Y-intercept for the given points.
Returns the kth smallest value in the range.
Range, k.
Kth smallest value.
Returns a normalized value.
X, mean, stddev.
Normalized value.
Returns the sample standard deviation.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample standard deviation.
Returns the sample standard deviation.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample standard deviation.
Treats True as 1; False as 0.
Returns the sample standard deviation.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample standard deviation.
Treats True as 1; False as 0.
Returns the population standard deviation.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The population standard deviation.
Returns the population standard deviation.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The population standard deviation.
Treats True as 1; False as 0.
Returns the standard error of the least square fit line through the given points.
Y_range, x_range.
Standard error.
Returns the mean of the range after removing points on either extreme.
Range, percent.
Kth smallest value.
Returns sample variance of the listed values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample variance.
Returns sample variance of the listed values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample variance.
True is treated as 1; False is treated as 0.
Returns population variance of the listed values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The population variance.
Returns population variance of the listed values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The population variance.
True is treated as 1; False is treated as 0.
Returns the Weibull distribution.
X, alpha, beta, cumulative.
The Weibull distribution.
Returns the one-tailed probability value of a Z test.
Range, mu, sigma.
Kth smallest value.
Calculate muti range and return cell value
contains multi cell range(eg:A1:A100)
Returns the maximum value of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the maximum value of all values listed in the argument.
The MINIFS function returns the minimum value among cells specified by a given set of conditions or criteria.
range of cells, criteria1, average_range1,...
returns the Minimum value of the cells.
The MAXIFS function returns the maximum value among cells specified by a given set of conditions or criteria.
range of cells, criteria1, average_range1,...
returns the Maximum value of the cells.
Returns the subtotal of input range(s).
A list of cell references(seperated by commas)
Subtotal of range(s)
Returns the minimum value of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the minimum value of all values listed in the argument.
Returns the simple average of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
A string holding the simple average of all values listed in the argument.
Returns the harmonic mean of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The harmonic mean all values listed in the argument.
Returns the hypergeometric distribution.
Number of sample successes, number of sample, number of population successes, number of population.
Returns the gamma distribution.
Returns the hypergeometric distribution.
Number of sample successes, number of sample, number of population successes, number of population.
Returns the gamma distribution.
Conditionally computes one of two alternatives depending upon a logical expression.
The first argument is
treated as a logical expression with a non-zero value considered True and a zero value considered False.
The value of only one of the alternatives is computed depending upon the logical expression.
A string holding a list of three arguments.
Returns a string holding the second argument if the first argument is True (non-zero). Otherwise, it returns a string holding the third argument.
Returns a value you specify if a formula evaluates to an error
otherwise, returns the result of the formula.
String to be tested.
Retuns the error string
Returns the y-intercept of the least square fit line through the given points.
y_range, x_range.
y-intercept for the given points.
Returns the binomial distribution.
Number of successes, number of trials, probability, cumulative.
The binomial distribution.
Returns the skewness of a distribution based on a population a characterization of the degree of asymmetry of a distribution around its mean.
numbers or names, arrays, or reference that contain numbers
Skewness of a distribution.
Returns population covariance, the average of the products of deviations for each data point pair in two data sets.
range1, range2.
The covarianceP
Returns the sample covariance, the average of the products of deviations for each data point pair in two data sets.
range1, range2.
The covariances
Returns the percentile position in the range.
Range, k.
Percentile position.
K is a value between 0 and 1.
Returns the percentage rank Exc in the range.
Range, x, significant digits.
Percentile position.
Significant digits are optional, defaulting to 3.
Returns the percentile position in the range.
Range, k.
Percentile position.
K is a value between 0 and 1.
Returns the percentage rank Inc in the range.
Range, x, significant digits.
Percentile position.
Significant digits are optional, defaulting to 3.
Returns the sample standard deviation.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample standard deviation.
Treats True as 1; False as 0.
Returns sample variance of the listed values.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample variance.
Calculates variance based on the entire population (ignores logical values and text in the population).
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The sample variance.
Returns the number of permutations for a given number of objects (with repetitions) that can be selected from the total objects.
n, k
The number of combinations.
Returns the normal distribution for the specified mean and standard deviation.
x, mean, standarddev, cumulative.
The normal distribution.
Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function.
Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.
P, mean, standard deviation.
Returns x such that normal distribution at x is p.
P should be between 0 and 1.
Returns the standard normal cumulative distribution function. The distribution has a mean of 0 (zero) and a standard deviation of one.
Syntax: NORMSDIST(z)
Z is the value for which you want the distribution.
Standard normal cumulative distribution.
Returns the PDF of the standard normal distribution.
Value at which the distribution is evaluated.
Returns the CDF of the standard normal distribution.
Value at which the distribution is evaluated.
Returns the PDF of the standard normal distribution.
Value at which the distribution is evaluated.
Returns the CDF of the standard normal distribution.
Value at which the distribution is evaluated.
Returns the inverse of the CDF of the standard normal distribution.
Cumulative probability of the distribution. p is between 0 and 1.
Returns the inverse of the standard normal cumulative distribution. The distribution has a mean of zero and a standard deviation of one.
Syntax: NORMSINV(p)
p is a probability corresponding to the normal distribution.
Inverse of standard normal cumulative distribution.
p should be between 0 and 1.
Calculates the Weibull Probability Density Function or the Weibull Cumulative Distribution Function for a supplied set of parameters.
x, alpha, beta, cumulative.
Returns the calculated weibull distribution.
cumulative = A logical argument which denotes the type of distribution to be used
TRUE = Weibull Cumulative Distribution Function
FALSE = Weibull Probability Density Function
Returns the exponential distribution.
x, lambda, cumulative.
The exponential distribution.
Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function.
Used to calculate the inverse of gamma cummulative distribution
Used to calculate the inverse gamma distribution at inital stage.
Used to calculate the inverse gamma distribution at middle stage.
Used to calculate the inverse gamma distribution at final stage.
Used to calculate the upper incomplete integral of inverse gamma function.
Used to calculate the lower incomplete integral of gamma function.
Used to calculate the upper incomplete integral of gamma function.
Used to calculate the CDF(Cummulative Distribution Function) of Gamma distribution.
Alpha
Beta
Used to calculate the PDF(Probability Distribution Function) of Gamma distribution.
Alpha
Beta
Returns the gamma distribution.
X, alpha, beta, cumulative.
The gamma distribution.
X, alpha, and beta should be positive real numbers. Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function. The distribution value
is computed interactively using Trapezoidal Rule to six to seven significant digits
or 20 iteration maximum.
Returns the inverse of gamma distribution.
p, alpha, beta
Returns x such that gamma distribution at x is p.
P, alpha, and beta should be positive real numbers, with p between 0 and 1.
Returns the geometric mean of all values listed in the argument.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The geometric mean all values listed in the argument.
Returns the gamma distribution.
X, alpha, beta, cumulative.
The gamma distribution.
X, alpha, and beta should be positive real numbers. Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function. The distribution value
is computed interactively using Trapezoidal Rule to six to seven significant digits
or 20 iteration maximum.
Returns the inverse of gamma distribution.
p, alpha, beta
Returns x such that gamma distribution at x is p.
P, alpha, and beta should be positive real numbers, with p between 0 and 1.
Returns the natural logarithm of the gamma function.
The value to be evaluated.
The natural logarithm of the gamma function.
Returns the Student's t-distribution.
x, degreesfreedom1.
Returns the Student's t-distribution.
Returns the inverse of the CDF of the Student's t distribution.
For k = 3, and 5+ the solution is an approximation.
Cumulative probability of the distribution. p is between 0 and 1.
Degrees of freedom.
Returns the PDF of Student's t distribution.
Value at which the distribution is evaluated.
Degrees of freedom.
Returns the CDF of Student's t distribution.
Value at which the distribution is evaluated.
Degrees of freedom.
Returns the inverse of F distribution.
p, degreesfreedom1, degreesfreedom2.
Returns x such that F distribution at x is p.
P should be between 0 and 1.
Returns the smallest value for which the cumulative binomial distribution is greater than or equal to a criterion value.
Number of trials, probability, alpha.
Returns the critical value.
Returns the inverse of the lognormal distribution.
p, mean, standarddev.
Returns the value x where the lognormal distribution of x is p.
Returns the lognormal distribution.
x, mean, standarddev.
The lognormal distribution.
Returns a confidence interval radius.
Alpha, standard deviation, size.
Returns x such that normal distribution at x is p.
P should be between 0 and 1.
Returns the chi-squared distribution.
x, degrees of freedom.
The chi-squared distribution.
Returns the F probability distribution.
x, degreesfreedom1, degreesfreedom2.
Returns the F probability distribution.
Returns the PDF of the F distribution.
Value at which the distribution is evaluated.
Degrees of freedom for numerator chi-sqared distribution. k1 > 0.
Degrees of freedom for denominator chi-sqared distribution. k2 > 0.
Returns the CDF of the F distribution.
Value at which the distribution is evaluated.
Degrees of freedom for numerator chi-sqared distribution.
Degrees of freedom for denominator chi-sqared distribution.
Euler integral.
Integral from 0 to infinity of e^(-t) * t^(z-1) dt
If z > 143 the return value will exceed the double.MaxValue. The function will throw an exception.
To get the CDF of the beta distribution.
Euler integral.
Returns the F (Fisher) probability distribution.
x, degreesfreedom1, degreesfreedom2.
Returns the F probability distribution.
Returns the chi-squared distribution.
x, degrees of freedom.
The chi-squared distribution.
Returns the inverse of the chi-squared distribution.
x, degrees of freedom.
The inverse of the chi-squared distribution.
Returns the Chi Test for independence.
Actual_range, expected_range.
Result of Chi Test: y-intercept.
Returns the inverse of the chi-squared distribution.
x, degrees of freedom.
The inverse of the chi-squared distribution.
Returns the binomial distribution.
Number of successes, number of trials, probability, cumulative.
The binomial distribution.
Returns the one-tailed probability value of a Z test.
Range, mu, sigma.
Kth smallest value.
Returns the rank of x in the range.
X, range, order.
Rank of x.
Returns the rank of x in the range.
X, range, order.
Rank of x.
The Irwin-Hall distribution results from the sum on n independent standard uniform variables
The value at which to evaluate the distribution.
The Irwin-Hall distribution results from the sum on n independent standard uniform variables
The value at which to evaluate the distribution.
The number of standard uniform variables.
Returns the number of possible combinations of k objects from a set of n object. The order of the chosen objects does not matter.
Number of objects
Number of objects chosen
Returns n!
0! = 1,otherwise n! = n * (n-1) * (n-2) * ... * 2 * 1,
Returns the PDF of the uniform distribution.
Number of successes, number of trials, probability, cumulative.
The binomial distribution.
Returns the PDF of the uniform distribution.
Value at which the distribution is evaluated.
Minimum value of the distribution.
Maximum value of the distribution.
Returns the quartile position in the range.
Range, q.
Percentile position.
Q is 0, 1, 2, 3, 4.
Returns the quartile position in the range.
Range, q.
Percentile position.
Q is 0, 1, 2, 3, 4.
Returns the negative binomial distribution.
Number of failures, success threshold, probability, cumulative.
The negative binomial distribution.
Returns the Poisson distribution.
x, mean, cumulative
Returns the exponential distribution.
Cumulative should be either
True if you want to return the value of the distribution function or False
if you want to return the value of the density function.
Compares the given two values
Two Numbers to be compared.
Returns the result of the comparision in the form of 0 or 1
Compares the given two values
Two Numbers to be compared.
Returns the result of the comparision in the form of 0 or 1
Returns the sum of the squares of the mean deviations.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
Sum of the squares of the mean deviation.
Returns the average of all the cells in a range which is statisfy the given single criteria
range of cells, criteria, average_range
returns the average value of the cells.
Return the value of ComputeConfidenceT
arguments
Returns the inverse of F distribution.
p, degreesfreedom1, degreesfreedom2.
Returns x such that F distribution at x is p.
P should be between 0 and 1.
This method is deprecated. Please use the instead.
Returns the inverse of the CDF of the F distribution.
For k = 3, and 5+ the solution is an approximation.
Cumulative probability of the distribution. p is between 0 and 1.
Degrees of freedom for numerator chi-sqared distribution.
Degrees of freedom for denominator chi-sqared distribution.
Returns the inverse of the CDF of the normal distribution.
Cumulative probability of the distribution. 0 <= p >= 1.
Mean of the distribution.
Standard deviation of the distribution.
Returns a vertical array of the most frequently occurring, or repetitive values in an array or range of data.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The most frequent value.
Returns the most frequent value in the range.
A string holding a list (separated by commas) of
cell references,
formulas, or numbers.
The most frequent value.
Returns the Student's t-distribution.
x, degreesfreedom1.
Returns the Student's t-distribution.
Returns the beta distribution.
x, degreesfreedom1, degreesfreedom2.
Returns the beta distribution.
Returns the Beta cumulative density function.
Value of the random variable for which the CDF is beign evaluated. x is between 0 and 1.
First shape parameter.
Second shape parameter.
Returns the Beta probability density function.
Value of the random variable for which the PDF is beign evaluated. x is between 0 and 1.
Number of trials.
Number of times the event occurs in n trials.
Calculates the standard normal cumulative distribution function (Gauss) for a given z-value.
This function returns the probability that a value from a standard normal distribution (with a mean of 0 and a standard deviation of 1) is less than or equal to the given z-value.
A string containing the arguments separated by commas. The format should be:
"z"
- z: The z-value for which you want to compute the cumulative distribution.
The probability that a value from a standard normal distribution is less than or equal to the given z-value.
The Gauss function is used in statistics to determine the likelihood of a value falling within a specific range of a normal distribution.
This can be particularly useful in hypothesis testing or probability estimation scenarios.
Computes the gamma function for the specified input.
A string representing the input number for which the gamma function will be calculated.
A string representing the result of the gamma function calculation.
The gamma function is an extension of the factorial function to real and complex numbers.
Calculate and return the gamma function value.
Computes the sample variance for a set of numbers.
A string containing a comma-separated list of numbers for which the sample variance will be calculated.
A string representing the sample variance of the provided numbers.
The sample variance is a measure of the dispersion of data points in a sample, and is calculated by taking the average of the squared deviations from the mean.
This function calculates how often values occur within a range of values, and then returns a vertical array of numbers.
A string containing two arguments separated by a comma. the format should be: data_array, bins_array.
- data_array: The range or array of data values you want to count.
- bins_array: The range or array of intervals to group the data values into.
A formatted string with the frequency counts separated by semicolons, or an error message if the input is invalid.
Calculates the frequency counts of numeric and date values from the provided source and bin arrays.
Text and blank values are ignored during processing.
An array of strings representing the source and bin data ranges.
A string representing the frequency counts separated by semicolons.
This function computes the probability of a specific outcome or a range of outcomes in a binomial distribution.
A comma-separated string containing the input arguments in the format:
"trials, probability_s, number_s, [number_s2]".
-
trials: The number of independent trials.
This value must be a non-negative integer. (e.g., 0, 1, 2, ...).
-
probability_s: The probability of success for each trial, represented as a decimal value.
This value must be a number between 0 and 1 (inclusive).
-
number_s: The specific number of successes for which to calculate the probability.
This must be an integer between 0 and trials.
-
number_s2 (optional): The upper limit for a range of successes.
If provided, the function calculates the probability for successes between number_s and number_s2 (inclusive).
This value must be an integer greater than or equal to number_s and less than or equal to trials.
A string representing the calculated probability for the specified number of successes or success range in the binomial distribution.
If the input parameters are invalid, an error message is returned.
This function calculates the cumulative Beta probability density function, which evaluates proportions or probabilities over a specified range.
A comma-separated string containing the input arguments in the format: "x, alpha, beta, [A], [B]".
-
x: The value at which to evaluate the Beta distribution. Must lie within the interval [A, B]. If A and B are omitted, the default range is [0, 1].
-
alpha: A positive shape parameter of the Beta distribution, determining its skewness.
-
beta: A positive shape parameter of the Beta distribution, determining its skewness.
-
A: (Optional) The lower bound of the interval. Defaults to 0 if omitted.
-
B: (Optional) The upper bound of the interval. Defaults to 1 if omitted.
A string representing the calculated cumulative Beta probability density function at the specified value x. Returns an error message if the input arguments are invalid or if x is outside the interval [A, B].
This function calculates and returns the t-value corresponding to the given two-tailed probability for the Student's t-distribution. It is commonly used to find critical t-values in hypothesis testing.
A comma-separated string containing the input arguments in the format: "Probability, Deg_freedom".
- Probability: The cumulative probability for both tails of the distribution. This value must be a decimal between 0 and 1 (exclusive).
- Deg_freedom: The degrees of freedom, typically the sample size minus 1.
This must be a positive integer.
A string representing the t-value corresponding to the specified two-tailed probability and degrees of freedom.
Returns an error message if the input arguments are invalid.
Retrieves two arrays of string values parsed from the input argument string.
Validates the inputs and checks for errors before computation.
The first array of strings parsed from the input arguments.
The second array of strings parsed from the input arguments.
The input argument string containing comma-separated values for two arrays.
A string indicating validation error if any, or an empty string if successful.
Thrown if the number of arguments is incorrect and exceptions are rethrown.
Calculates the F-test p-value based on two arrays of double values representing two data sets.
Assumes that input validation has already been performed by GetValuesOfFTest.
The first array of doubles representing the first data set.
The second array of doubles representing the second data set.
The p-value of the F-test for the two data sets.
This function computes and returns the critical t-value for a two-tailed Student's t-distribution based on a specified probability and degrees of freedom.
A comma-separated string containing the input arguments in the format: probability, deg_freedom.
- Probability: The cumulative probability for the two-tailed Student's t-distribution. This value must be between 0 and 1 (exclusive of 0 and 1).
- Deg_freedom: The number of degrees of freedom that defines the distribution.It must be a positive integer.
A string representing the t-value corresponding to the given two-tailed probability and degrees of freedom.
If the input is invalid, an error message or exception may be returned.
This function computes the critical value (inverse) of the F-distribution for a specified cumulative probability and degrees of freedom.
It is typically used in hypothesis testing or analysis of variance (ANOVA).
A comma-separated string containing the input arguments in the format: "p, degreesFreedom1, degreesFreedom2".
-
p: The cumulative probability for which the F value is to be calculated. This value must be a number between 0 and 1 (exclusive of 0 and 1).
-
degreesFreedom1: The degrees of freedom for the numerator. This must be a positive integer.
-
degreesFreedom2: The degrees of freedom for the denominator.This must be a positive integer.
A string representing the critical F value such that the cumulative probability of the F-distribution equals p.
If the input parameters are invalid, an error message is returned.
Calculates the inverse of the F-distribution for the given probability and degrees of freedom.
Uses a binary search approach to find the value corresponding to the specified cumulative probability.
The cumulative probability for which the F value is to be calculated. Must be between 0 and 1.
The degrees of freedom for the numerator.
The degrees of freedom for the denominator.
The F value corresponding to the given cumulative probability.
Calculates the cumulative distribution function (CDF) of the F-distribution.
This computes the probability that a random variable from the F-distribution is less than or equal to a given value.
The F value for which the cumulative probability is calculated.
The degrees of freedom for the numerator.
The degrees of freedom for the denominator.
The cumulative probability corresponding to the given F value.
This function computes a linear trend line based on a given set of dependent y-values and, optionally, independent x-values, and returns predicted values along the trend line.
This function can also calculate predictions for new X values if provided.
A comma-separated string containing the input arguments in the format: "knownY, [knownX], [newX], [const]".
-
knownY: A set of dependent y-values for which a trend line will be calculated.These values must be provided as a comma-separated string..
-
knownX [optional]: A set of independent x-values corresponding to knownY. These values must be provided as a comma-separated string.If omitted, x-values are assumed to be a sequence starting from 1.
-
newX [optional]: A set of new x-values for which corresponding y-values are to be predicted. These values must be provided as a comma-separated string. If omitted, predictions are made for the given knownX.
-
const [optional]: A boolean value indicating whether the regression line should include a y-intercept.If true (default), the intercept is included. If false, the intercept is forced to be 0.
A comma-separated string of predicted y-values along the trend line. If an error occurs, such as invalid input or mismatched data sets, an error message is returned..
Calculate and retrun the y-values along that line for the array of new_x's.
Get the argument values for Trend function and return error string for invalid arguments.
Adds an intercept column to a matrix, where the intercept column is filled with ones.
The input matrix to which the intercept column will be added. A 2D array with dimensions [rows, columns].
A new 2D array with the same number of rows as the input matrix and one additional column.
The first column of the result is filled with ones (intercept column), followed by the original matrix columns.
Computes the transpose of a given matrix.
The input matrix to be transposed. A 2D array where elements are rearranged
such that rows become columns and columns become rows.
A 2D array representing the transposed matrix. The resulting matrix will have
dimensions [columns of the input matrix, rows of the input matrix].
Computes the inverse of a square matrix using the Gaussian elimination method.
The input matrix to be inverted. It must be a square matrix (same number of rows and columns).
a 2D array representing the inverse of the input matrix. If the matrix is singular or non-invertible,
an exception may be thrown due to division by zero or numerical instability.
Converts a single-column matrix into a one-dimensional vector (array).
The input matrix, which must have exactly one column.
a one-dimensional array containing the elements of the input matrix's single column.
Generates an identity matrix of the specified size.
The size of the identity matrix (number of rows and columns).
a square 2D array representing the identity matrix, where all diagonal elements are 1,
and all off-diagonal elements are 0.
Converts a one-dimensional vector (array) into a column matrix.
The input vector to be converted.
a 2D array representing the column matrix where each element of the
input vector becomes a row in the single-column matrix.
Calculate and return double values for xValues,yValues and newXValues.
Calculate and return the Student's t-Test probability value.
Calculates the variance of a dataset.
A list of double values representing the dataset.
The mean of the dataset.
The variance of the dataset.
Computes the cumulative distribution function (CDF) for Student's t-distribution.
The t-statistic for which to compute the CDF.
The degrees of freedom associated with the t-distribution.
A double value representing the cumulative probability associated with the given t-statistic
and degrees of freedom.
s
This function calculates and returns the probability (percentage points) for the Student's t-distribution, given a numeric t-value (x), degrees of freedom, and number of tails.
This function is typically used in hypothesis testing to determine the significance of results.
A string containing three arguments separated by commas, in the format: x, deg_freedom, tails.
- X: A numeric value representing the t-statistic (calculated from a statistical test).
- Deg_freedom: An integer representing the degrees of freedom, typically calculated as the sample size minus 1.
- Tails: Specifies whether to calculate the one-tailed or two-tailed distribution.
Use Tails = 1 for a one-tailed test and Tails = 2 for a two-tailed test.
A string representing the probability (as percentage points) associated with the given inputs:x (t-value), deg_freedom, and the specified number of tails.
This value helps in determining the significance level during hypothesis testing.
This function computes and returns the two-tailed probability for the Student's t-distribution.
This function calculates the probability of observing a t-value as extreme as the given t-value (in either tail),for a specified degrees of freedom.
A string containing two arguments separated by commas, in the format: X, deg_freedom.
- X: The numeric t-value at which to evaluate the distribution. This represents the test statistic.
- Deg_freedom: An integer representing the degrees of freedom, usually calculated as the sample size minus 1.
A string representing the two-tailed probability associated with the specified t-value and degrees of freedom.
The result indicates the likelihood of observing a t-value as extreme as X, in both tails of the distribution.
The two-tailed t-distribution is commonly used in hypothesis testing where the alternative hypothesis tests for a difference in either direction (e.g., not equal to a specified value).
Input values should be in the correct format and range to avoid calculation errors.
Input: "2.5, 10"
Output: "0.0254" (depending on implementation and precision, result represents a probability).
This function computes and returns the right-tailed probability for the Student's t-distribution.
This function calculates the probability of observing a t-statistic greater than the given t-value (X), for a specified degrees of freedom.
A string containing two arguments separated by commas, in the format: X, deg_freedom.
- X: The numeric t-value at which to evaluate the distribution.This represents the test statistic.
- Deg_freedom: An integer representing the degrees of freedom, usually calculated as the sample size minus 1.
A string representing the right-tailed probability (as a percentage) associated with the specified t-value and degrees of freedom.
This value indicates the likelihood of observing a t-value greater than X.The right-tailed t-distribution is commonly used in hypothesis testing for one-sided tests where the alternative hypothesis specifies a direction (e.g., greater than a given value).
Input values should adhere to the expected format and range for accurate results.
Input: "2.5, 10"
Output: "0.0127" (depending on the implementation and precision; result represents a probability).
This method compute the actual T-distribution probability value by using numeric value and the number of degrees of freedom.
This method computes the incomplete beta function, which is part of the distribution's calculation, using series and logarithmic expressions.
This method computes a series used to approximate the incomplete beta function for values of a and b.
This function computes and returns the fraction expansion of the incomplete beta function
This function predicts a future value along a linear trend based on existing data using linear regression.
Calculates the forecasted value for a specified independent variable, x,based on the relationship between the provided dependent (known_y's) and independent (known_x's) data sets.
A comma-separated string containing three arguments in the format: x, known_y's, known_x's.
- x: The independent variable (data point) for which the prediction is to be made.
- known_y's: A space-separated string representing an array or range of dependent values (the values to predict).
- known_x's: A space-separated string representing an array or range of independent values corresponding to known_y's.
A string representing the predicted value for the specified x, or an error message if the input is invalid or the calculation cannot be performed.
Return the value of TranslateText
value
language
This method is deprecated.
Return the numeric code for first char of text
text
numeric code
Finds the first occurrence of one string in another string.
Conatins two or three arguments. The first argument is the string
to find. The second string is the string that is being searched. The third argument
is the start location in the second string for the search.
The location of the found string.
Returns the left so many characters in the given string.
Contains the string and the number of characters.
A left sub string..
Used to compute the JIS function
arguments
Returns the length of the given string.
Contains the string.
An integer length.
Returns a substring of the given string.
Contains the original string, start position of the substring,
and the number of characters in the substring.
A substring.
Returns the right so many characters in the given string.
Contains the string and the number of characters.
A right substring.
Convert the text to number
text,
decimal separator,group separator
Returns the text like first letter with upper letter in each word
Text
proper text
Replace the part of the text with a new text from orginal text
Text,Start index, Number of char to replace, new text
replaced string
Returns the number of repeated text
text, repeated count
text
Returns the number of the starting position of the first string from the second string.
first strring, second string and starting position
index of the string
Returns the Unicode char for the respective numeric value
Number
unicode char
Returns the corresponding number code for the first char of string.
text
numeric code
Returns the character whose number code is specified in the argument.
The number used to retrieve the character.
The character string.
Retuns the text removing the first 32 nonprintable characters(ranging from 0 to 31) in 7-bit ASCII code.
Text or range holding text including nonprintable characters
Text without nonprintable characters(first 32)
Returns whether or not the two arguments passed in are exactly the same.
A string holding two arguments (separated by commas) of
cell references, strings,
formulas, or numbers.
True if the arguments are exactly the same ignoring formats, false other wise.
Finds the first occurrence of one string in another string.
Conatins two or three arguments. The first argument is the string
to find. The second string is the string that is being searched. The third argument
is the start location in the second string for the search.
The location of the found string.
The location count starts at 1. If the third argument is missing, it defaults to 1.
If the first string does not appear in the second string, #VALUE! is returned. The searches are done
in a case sensitive manner.
Returns the value at a specified row and column from within a given range.
look_range, row, col
The value.
Only the array form of this function is supported.
Returns the number of the starting position of the first string from the second string.
first strring, second string and starting position
index of the string
Find and return list of unique elements for two dimentional array elements.
return list of unique elements.
Validate and return the error string for TextBefore/TextAfter formula.
validated argument
This function returns text that occurs after given character or string.
A string containing the arguments separated by commas.
The format should be: "text,delimiter,instance_num, match_mode, match_end, if_not_found".
- textThe text you are searching within. Wildcard characters not allowed.
- delimiterThe text that marks the point after which you want to extract.
- instance_num[Optional] The instance of the delimiter after which you want to extract the text.(default is 1).
- match_mode[Optional] Determines whether the text search is case-sensitive. The default is case-sensitive.
- 0 - Case sensitive.
- 1 - Case insensitive.
- match_end[Optional] Treats the end of text as a delimiter. By default, the text is an exact match.
- 0 - Don't match the delimiter against the end of the text.
- 1 - Match the delimiter against the end of the text.
- if_not_found[Optional] Value returned if no match is found. By default, #N/A is returned.
The text that occurs after given character or string.
Validate and get the argument for TextAfter/TextBefore formula.
This function returns text that occurs text that occurs before a given character or string
A string containing the arguments separated by commas.
The format should be: "text,delimiter,instance_num, match_mode, match_end, if_not_found"
- textThe text you are searching within. Wildcard characters not allowed.
- delimiterThe text that marks the point after which you want to extract.
- instance_num[Optional] The instance of the delimiter after which you want to extract the text.(default is 1).
- match_mode[Optional] Determines whether the text search is case-sensitive. The default is case-sensitive.
- 0 - Case sensitive.
- 1 - Case insensitive.
- match_end[Optional] Treats the end of text as a delimiter. By default, the text is an exact match.
- 0 - Don't match the delimiter against the end of the text.
- 1 - Match the delimiter against the end of the text.
- if_not_found[Optional] Value returned if no match is found. By default, #N/A is returned.
The text that occurs before a given character or string.
Find index to returns text when delimiter is character and instance_num is negative that appears after a given character.
The text you are searching within
The text that marks the point after which you want to extract.
The instance of the delimiter after which you want to extract the text.By default, instance_num = 1
The index to returns text that appears after a given character.
Find index to returns text when delimiter is word and instance_num is negative that appears after a given character.
The text you are searching within
The text that marks the point after which you want to extract.
The instance of the delimiter after which you want to extract the text.By default, instance_num = 1.
The index to returns text that appears after a given word.
Find index to returns text when delimiter is word and instance_num is positive that appears after a given character.
The text you are searching within.
The text that marks the point after which you want to extract.
The instance of the delimiter after which you want to extract the text.By default, instance_num = 1.
The index to returns text that appears after a given word.
Find index to returns text when delimiter is character and instance_num is positive that appears after a given character.
The text you are searching within
The text that marks the point after which you want to extract.
The instance of the delimiter after which you want to extract the text.By default, instance_num = 1.
The index to returns text that appears after a given character.
This function returns text from any specified value. It passes text values unchanged, and converts non-text values to text.
A string containing the arguments separated by commas.
The format should be: "value, format"
- valueThe value to return as text.
- formatThe format of the returned data.[optional]
- 0 - Concise format that is easy to read. The text returned will be the same as the text rendered in a cell that has general formatting applied.
- 1 - Strict format that includes escape characters and row delimiters. Generates a string that can be parsed when entered into the formula bar. Encapsulates returned strings in quotes except for Booleans, Numbers and Errors.
Text from any specified value
Returns the text from any specified value.
The value to return as text.
The format of the returned data.
Calculate array format argument value.
Return calculated array format argument value for interior and direct VALUETOTEXT formula.
This function returns text from any specified array/range. It passes text values of array unchanged, and converts non-text values to text.
A string containing the arguments separated by commas.
The format should be: "array, format"
- arrayThe array to return as text.
- formatThe format of the returned data.[optional]
- 0 - Concise format that is easy to read.
The text returned will be the same as the text rendered in a cell that has general formatting applied.
- 1 - Strict format that includes escape characters and row delimiters.
Generates a string that can be parsed when entered into the formula bar.
Encapsulates returned strings in quotes except for Booleans, Numbers and Errors.
Text from the specified array/range.
Calculates the final string of the specified condition in the formula from the sepcified range of cells.
an array of text values from any specified range.
Converts a flat list of cell data into a structured list of rows and columns.
List of cell data.
Number of columns in the data.
Structured data as a list of lists.
Returns the text from any specified value.
The value to return as text.
The format of the returned data.
string value after checking with the conditions.
Validates the argument list and extracts the range, ignore, and scanByColumn values.
Output parameter that holds the value to be ignored.
Output parameter that indicates whether to scan by column.
Output parameter that holds the range value.
The argument list string to be parsed and validated.
Returns an error string if there is any validation error, otherwise returns an empty string.
Thrown when there is an invalid number of arguments or invalid argument value.
Converts the values of a given array range to a single column/row format.
The range of the array to be converted.
A value indicating whether to ignore certain cells (e.g., blanks or errors).
A boolean indicating whether to scan the range by columns (true) or by rows (false).
A string representing the values of the array converted to a single column/row, separated by the defined separator.
Checks the conditions of the given cell value in the array based on specified criteria.
The value of the cell to be checked.
A value indicating whether to ignore certain cells (e.g., blanks or errors).
A list to which the cell value will be added if it meets the conditions.
A boolean indicating whether the cell value was added to the list.
Retrieves the totalnumber of columns, totalnumber of rows, and array values from the given array/range.
Output parameter for the total number of columns.
Output parameter for the total number of rows.
Output parameter for the list of array values.
Input arguments, including range or array values.
Returns specified columns from an array or range.
A string containing the array or range and the column indexes separated by commas.
The format should be: array, col_num1, [col_num2], ...
-
array: The source array or range.
-
col_num1: An integer specifying the first column to return.
-
[col_num2]: [optional] Index numbers of additional columns to return.
A formatted string representing the specified columns from the array or range.
Returns the row/column indexes as a string array from the argument.
The arguments specifying the range and indexes to choose.
The total number of columns in the range.
The total number of rows in the range.
A boolean indicating whether the indexes are for columns (true) or rows (false).
An output parameter that will contain the computed indexes as an integer array.
A string indicating any error that occurred during the computation; otherwise, an empty string.
Computes and returns a formatted string of column or row values from a range based on specified indexes.
The range of the array to be processed.
An array of indexes specifying the columns or rows to be chosen.
The total number of columns in the range.
The total number of rows in the range.
A list of the values in the array.
A boolean indicating whether the indexes are for columns (true) or rows (false).
A formatted string representing the chosen column or row values, separated by the defined separator.
Returns specified rows from an array or range.
A string containing the array or range and the row indexes separated by commas.
The format should be: array, row_num1, [row_num2], ...
-
array: The source array or range.
-
row_num1: An integer specifying the first row to return.
-
[row_num2]: [optional] Index numbers of additional rows to return.
A formatted string representing the specified rows from the array or range.
Converts a flat list of cell data into a structured list of columns.
List of cell data
Number of columns in the data
Structured data as a list of lists by columns
This function generates a list of sequential numbers in an array.
A string containing the arguments separated by commas.
The format should be: "rows, columns, start, step".
- rows: The number of rows to fill.
- columns: The number of columns to fill. If omitted, defaults to 1 column.
- start: The starting number in the sequence. If omitted, defaults to 1.
-
step: The increment for each subsequent value in the sequence. It can be positive or negative.
- If positive, subsequent values increase, creating an ascending sequence.
- If negative, subsequent values decrease, producing a descending sequence.
- If omitted, the step defaults to 1.
Generates and returns an array of sequential numbers.
Generate an array of sequential number
Generate and return an array of sequential number
This function splits text strings by using column and row delimiters.
A string containing the arguments separated by commas.
The format should be: "text, col_delimiter, row_delimiter, ignore_empty, match_mode, pad_with".
- text: The text you want to split.
- col_delimiter: The text that marks the point where to spill the text across columns.
- row_delimiter [optional]: The text that marks the point where to spill the text down rows.
-
ignore_empty [optional]: Specifies whether to ignore empty values or not. Defaults to FALSE.
- FALSE (default) - create empty cells for consecutive delimiters without a value in-between.
- TRUE - ignore empty values, i.e., don't create empty cells for two or more consecutive delimiters.
-
match_mode [optional]: Determines case-sensitivity for the delimiter. Enabled by default.
- 0 (default) - case-sensitive.
- 1 - case-insensitive.
- pad_with [optional]: A value to use in place of missing values in two-dimensional arrays. The default is a #N/A error.
Splitted text strings by using column and row delimiters.
Compute and return delimters when delimter contains multiple character{",",";"}.
delimters when contains multiple character.
splits text strings by a given row and column delimiter across columns or/and rows.
the text to split
a character(s) that indicates where to split the text across rows.
a character(s) that indicates where to split the text across columns.
specifies whether to ignore empty values or not.
determines case-sensitivity for the delimiter.
a value to use in place of missing values in two-dimensional arrays.
maxColumn count.
list of splitted text.
splits text strings by a column delimiter across columns.
This function retrieves a specified subset of values from a given array or range based on the number of rows and/or columns provided.
A string containing the arguments separated by commas in the following format:
-
array: The array or range from which to retrieve values.
-
rows: [Optional] The number of rows to return.
A positive value returns rows from the start of the array, while a negative value returns rows from the end.
If omitted, columns must be provided.
-
columns: [Optional] The number of columns to return.
A positive integer returns columns from the start of the array, while a negative integer returns columns from the end.
If omitted, rows must be provided.
A formatted string containing the subset of values from the specified array or range. If the input is invalid, an appropriate error message is returned.
Retrieves values from the given range based on the specified rows and columns.
The range of cells.
The number of rows to retrieve.
The number of columns to retrieve.
A string containing the retrieved values, separated by a specified separator.
This function removes the specified number of rows and/or columns from the start or end of an array or range.
A string containing the arguments separated by commas. The format should be: array, rows, [columns].
-
array: The array or range from which values are to be removed.
-
rows: [Optional] The number of rows to remove. A positive value removes rows from the start of the array,
and a negative value removes rows from the end of the array. If omitted, columns must be provided.
-
columns: [Optional] The number of columns to remove. A positive integer removes columns from the start of the array,
and a negative integer removes columns from the end of the array. If omitted, rows must be provided.
A formatted string representing the array after removing the specified rows and/or columns.
If the inputs are invalid, an error message is returned.
Drops specified rows and/or columns from the array.
Input range or array.
Number of rows to drop.
Number of columns to drop.
Total number of rows in the array.
Total number of columns in the array.
List of array values.
Resultant string after dropping specified rows and/or columns.
This function expands or pads an array to specified row and column dimensions.
A string containing the arguments separated by commas.
The format should be: "array, rows, columns, pad_with".
- array: The array to expand.
- rows: The number of rows in the expanded array. If missing, rows will not be expanded.
- columns: The number of columns in the expanded array. If missing, columns will not be expanded.
- pad_with: The value with which to pad. The default is #N/A.
An expanded or padded array with the specified row and column dimensions.
Compute and return the expanded arraay based on pad_with and rows and cols argument.
This function computes the vector (one-dimensional array) and returns the wrapped values.
The input arguments as a single string separated by commas.
The format is: vector, wrap_count, [pad_with]
-
vector: The source one-dimensional array or range.
-
wrap_count: The maximum number of values per row.
-
pad_with [optional]: The value to pad the last row with if there are insufficient items to fill it.
If omitted, the missing values will be padded with #N/A (default).
A string representing the wrapped rows or an error message.
Wraps the rows or columns of an array based on the specified wrap count and padWith.
The vector of values to be wrapped.
The count at which to wrap the rows or columns.
The value to pad with if necessary.
A boolean indicating whether to wrap rows (true) or columns (false).
A string representing the wrapped rows or columns.
This function computes the vector (one-dimensional array) and returns the wrapped values.
The input arguments as a single string separated by commas.
The format is: vector, wrap_count, [pad_with]
- vector: The source one-dimensional array or range.
- wrap_count: The maximum number of values per column.
- pad_with [optional]: The value to pad the last column with if there are insufficient items to fill it.
If omitted, the missing values will be padded with #N/A (default).
A string representing the wrapped columns or an error message.
Checks for error strings in the given arguments and extracts the range, wrap count, and pad width.
The input arguments as a single string.
The extracted range of values.
The extracted wrap count.
The extracted pad width.
A string representing any error found, or an empty string if no errors are found.
This function sorts the contents of an array or range by columns or rows in ascending or descending order.
A string containing the arguments separated by commas. The format should be: "array, sort_index, sort_order, by_col".
-
array: The array or range to be sorted.
-
sort_index [Optional]: The column or row index on which to base the sorting. If omitted, the first column or row is used.
-
sort_order [Optional]: Defines the sort order. If omitted, the default is ascending order.
- 1 or omitted - Ascending order (default).
- -1 - Descending order.
-
by_col [Optional]: A logical value indicating the direction of sorting. If omitted, the default is to sort by rows.
- FALSE or omitted - Sort by row (default).
- TRUE - Sort by column.
A string representing the sorted array.
Compute and sort the values from array or range
Array values specified as a range
Sort index is a column index from the range or array values
Sorting order (1 for ascending, -1 for descending)
Scan by column (true/false)
String of the sorted values
Sorts the structured data by the specified row index and order.
Structured data as a list of lists
Index of the row to sort by
Order to sort by (1 for ascending, -1 for descending)
Sorted structured data
Sorts the structured data by the specified column and order.
Structured data as a list of lists
Index of the column to sort by
Order to sort by (1 for ascending, -1 for descending)
Sorted structured data
Compares two values for sorting based on the specified sort order.
The first value to compare.
The second value to compare.
The sort order (1 for ascending, -1 for descending).
An integer indicating the relative order of the values.
This function sorts the contents of a range or array based on the values in corresponding ranges or arrays.
A string containing the arguments separated by commas.
The format should be: "array, by_array1, sort_order1, by_array2, sort_order2,…".
-
array: The array or range to sort.
-
by_array1: The array or range to sort by.
-
sort_order1: The order to use for sorting. Default is ascending.
- 1 for ascending.
- -1 for descending.
A sorted range or array.
Retrieves the values of the specified arrays and performs sorting based on the provided criteria.
An array of strings representing the arguments for the SORTBY function.
A list of strings representing the sort orders for each byArray.
A list of strings representing the byArrays used for sorting.
A string representing the sorted values.
Performs the sorting for the SORTBY function.
A list of strings representing the values of the initial array or range.
A list of strings representing the byArrays used for sorting.
A list of strings representing the sort orders for each byArray.
The number of columns in the initial array or range.
A string representing the sorted values.
This function is used to filter a range of data based on the criteria that you specify.
The input arguments as a single string, separated by commas.
The format is: array, include, [if_empty]
-
array: The source range or array of values to filter.
-
include: The criteria for filtering, provided as a Boolean array or a condition that results in a Boolean array (e.g., B2:B13=B2").
-
if_empty [optional]: The value to return if no entries meet the criteria. If omitted, a default error message is returned.
A string representing the filtered values based on the criteria, or an error message if the arguments are invalid or if an error occurs.
This method used to calculate the criteria for Filter formula using include argument and retrun the calculated string.
This method filters the given array based on specified criteria and returns the results as a formatted string.
The array to filter.
The criteria for filtering the array.
Additional conditions or logical operators for filtering.
Value to return if no items match the criteria.
Number of columns in the array for filtering.
True if includeArray is horizontal, false if vertical.
A formatted string with the filtered results.
This method converts a numeric value to its equivalent Thai text and adds the currency unit "Baht" for the integer part, and "Satang" for the fractional part if applicable.
A string representing a number, a reference to a cell containing a number, or a formula that evaluates to a number. This number will be converted to Thai text with a "Baht" suffix.
A string representing the given number in Thai text, followed by "Baht" for the whole number part and "Satang" for the fractional part.
If the input number is zero, it returns "ศูนย์บาทถ้วน". If the input is invalid, it returns an error message.
Converts the integer part of a number into its equivalent Thai text representation.
The integer part of the number to convert.
Array of Thai words for ones (1-9).
Array of Thai words for tens (10, 20, etc.).
Array of Thai words for higher units (hundred, thousand, etc.).
A string representing the integer in Thai text.
Return the XML content of the given document
web link
XML data
Returns the encode url of the given text
text
returns the EncodeURL
Filter the value from XML document
XML content
value
Event delegate for ExternalFormulaEventArgs event.
The CalcEngine.
The for this event.
The event args for the ExternalFormulaEventArgs event, which is raised whenever the CalcEngine calculate external reference formula.
Event delegate for ExternalFormulaEventArgs event.
The CalcEngine.
The for this event.
The event args for the ExternalFormulaEventArgs event, which is raised whenever the CalcEngine is trying to get external worksheet from external reference formula.
Event delegate for ExternalFormulaEventArgs event.
The CalcEngine.
The for this event.
The event args for the ExternalFormulaEventArgs event, which is raised whenever the CalcEngine is trying to get external named range address from external reference formula.
Event delegate for the FormulaParsing event
Used by the 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.
Please note that this event may be raised more than once as a string is parsed.
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.
//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);
}
Holds a reference to the string that is to be parsed..
The formula that is to be parsed.
Default constructor.
A property that gets/sets the formula about to be parsed.
Event delegate for UnknownFunction event.
The CalcEngine.
The for this event.
The event args for the UnknownFunction event which is raised whenever the CalcEngine encounters a function
that is does not know.
Gets the name of the unknown function.
Gets the location of the missing function.
Event delegate for UpdateNamedRange event.
The CalcEngine.
The for this event.
The event args for the UpdateNamedRange event, which is raised whenever the CalcEngine calculate the intersection range of two named range .
Represents the method that will handle FormulaComputed event.
Source of this event.
An instance of that contains the event data.
Represents a class which holds the properties of FormulaComputed event.
Initializes a new instance of the FormulaComputedEventArgs class.
Currently calculated formula.
The CalculatedValue for the formula.
The currently calculating cell address.
Returns true if the currently calculating formula is interior formula;else false.
Gets the currently calculated formula name.
Gets or sets the value for the calculated formula.
Gets the currently calculated formula's cell reference.
Gets the value whether the currently calculated formula is interior formula or not.
Returns true if the currently calculated formula is interior formula;else false.
Gets the value whether to handle the calculation of the formula.
To handle the calculation of the formula.
The CustomComparer class provides a mechanism for comparing two strings based on a custom comparison logic.
It implements the interface to allow sorting or ordering operations on collections
of strings using the specified comparison logic.
This class is particularly useful when you need to perform custom sorting or ordering of strings in a collection,
such as a list or array. The comparison logic is provided via a delegate, which
allows flexibility in defining how two strings should be compared.
Initializes a new instance of the class with the specified comparison logic.
A delegate that defines the logic for comparing two strings.
Compares two strings and returns a value indicating whether one is less than, equal to, or greater than the other.
The first string to compare.
The second string to compare.
A signed integer that indicates the relative values of and :
- Less than zero: is less than .
- Zero: equals .
- Greater than zero: is greater than .
A class that allows you to quickly add calculation support for controls on a form, or usercontrol.
To use CalcQuick, you instantiate an instance of the class. Then just by indexing the
class object with string names to identify a formula object, you can have calculation support
in your form. Alternatively, you can add a collection of Control-derived objects and the
CalcQuick object will bind the Control.Text property allowing you to use the Control/Name property
to reference other controls in a formula.
Here is code that uses three TextBoxes, the first showing a value for an angle in degrees,
and the other two displaying the sine and cosine of this angle. In this code, the calculations
are done on the click of a button:
CalcQuick calculator = null;
private void AngleForm_Load(object sender, System.EventArgs e)
{
//TextBox Angle = new TextBox();
this.Angle.Name = "Angle";
this.Angle.Text = "30";
//cosTB = new TextBox();
this.cosTB.Name = "cosTB";
this.cosTB.Text = "= cos([Angle] * pi() / 180) ";
//sinTB = new TextBox();
this.sinTB.Name = "sinTB";
this.sinTB.Text = "= sin([Angle] * pi() / 180) ";
// Instantiate the CalcQuick object:
this.calculator = new CalcQuick();
}
// Perform a manual calculation:
private void ComputeButton_Click(object sender, System.EventArgs e)
{
// Let the calculator know the values/formulas
// by using an indexer on the calculator object.
// Here we are using the TextBox.Name as the indexer key
// provided to the calculator object. This is not required.
// The only restriction for the indexer key values is that they
// be unique nonempty strings:
this.calculator["Angle"] = this.Angle.Text;
this.calculator["cosTB"] = this.cosTB.Text;
this.calculator["sinTB"] = this.sinTB.Text;
// Mark the calculator dirty:
this.calculator.SetDirty();
// Now as the values are retrieved from the calculator, they
// will be the newly calculated values:
this.cosTB.Text = this.calculator["cosTB"];
this.sinTB.Text = this.calculator["sinTB"];
}
Dim calculator As CalcQuick = Nothing
Private Sub AngleForm_Load(sender As Object, e As System.EventArgs)
'TextBox Angle = new TextBox();
Me.Angle.Name = "Angle"
Me.Angle.Text = "30"
'cosTB = new TextBox();
Me.cosTB.Name = "cosTB"
Me.cosTB.Text = "= cos([Angle] * pi() / 180) "
'sinTB = new TextBox();
Me.sinTB.Name = "sinTB"
Me.sinTB.Text = "= sin([Angle] * pi() / 180) "
'Instantiate the CalcQuick object:
Me.calculator = New CalcQuick()
End Sub 'AngleForm_Load
'Perform a manual calculation:
Private Sub ComputeButton_Click(sender As Object, e As System.EventArgs)
'Let the calculator know the values/formulas
'by using an indexer on the calculator object.
'Here we are using the TextBox.Name as the indexer key
'provided to the calculator object. This is not required.
'The only restriction for the indexer key values is that they
'be unique nonempty strings:
Me.calculator("Angle") = Me.Angle.Text
Me.calculator("cosTB") = Me.cosTB.Text
Me.calculator("sinTB") = Me.sinTB.Text
'Mark the calculator dirty:
Me.calculator.SetDirty()
'Now as the values are retrieved from the calculator, they
'will be the newly calculated values:
Me.cosTB.Text = Me.calculator("cosTB")
Me.sinTB.Text = Me.calculator("sinTB")
End Sub 'ComputeButton_Click
Here is code that uses the same three TextBoxes as above, but this time
the code is set up to automatically compute things as you change the
value in the Angle TextBox. There is no longer a need for a button handler
to trigger setting / getting values.
CalcQuick calculator = null;
private void AngleForm_Load(object sender, System.EventArgs e)
{
//TextBox Angle = new TextBox();
this.Angle.Name = "Angle";
this.Angle.Text = "30";
//cosTB = new TextBox();
this.cosTB.Name = "cosTB";
this.cosTB.Text = "= cos([Angle] * pi() / 180) ";
//sinTB = new TextBox();
this.sinTB.Name = "sinTB";
this.sinTB.Text = "= sin([Angle] * pi() / 180) ";
// Instantiate the CalcQuick object:
this.calculator = new CalcQuick();
}
// Perform a manual calculation:
private void ComputeButton_Click(object sender, System.EventArgs e)
{
// Let the calculator know the values/formulas
// by using an indexer on the calculator object.
// Here we are using the TextBox.Name as the indexer key
// provided to the calculator object. This is not required.
// The only restriction for the indexer key values is that they
// be unique nonempty strings:
this.calculator["Angle"] = this.Angle.Text;
this.calculator["cosTB"] = this.cosTB.Text;
this.calculator["sinTB"] = this.sinTB.Text;
// Mark the calculator dirty:
this.calculator.SetDirty();
// Now as the values are retrieved from the calculator, they
// will be the newly calculated values:
this.cosTB.Text = this.calculator["cosTB"];
this.sinTB.Text = this.calculator["sinTB"];
}
Dim calculator As CalcQuick = Nothing
Private Sub AngleForm_Load(sender As Object, e As System.EventArgs)
'TextBox Angle = new TextBox();
Me.Angle.Name = "Angle"
Me.Angle.Text = "30"
'cosTB = new TextBox();
Me.cosTB.Name = "cosTB"
Me.cosTB.Text = "= cos([Angle] * pi() / 180) "
'sinTB = new TextBox();
Me.sinTB.Name = "sinTB"
Me.sinTB.Text = "= sin([Angle] * pi() / 180) "
'Instantiate the CalcQuick object:
Me.calculator = New CalcQuick()
End Sub 'AngleForm_Load
'Perform a manual calculation:
Private Sub ComputeButton_Click(sender As Object, e As System.EventArgs)
'Let the calculator know the values/formulas
'by using an indexer on the calculator object.
'Here we are using the TextBox.Name as the indexer key
'provided to the calculator object. This is not required.
'The only restriction for the indexer key values is that they
'be unique nonempty strings:
Me.calculator("Angle") = Me.Angle.Text
Me.calculator("cosTB") = Me.cosTB.Text
Me.calculator("sinTB") = Me.sinTB.Text
'Mark the calculator dirty:
Me.calculator.SetDirty()
'Now as the values are retrieved from the calculator, they
'will be the newly calculated values:
Me.cosTB.Text = Me.calculator("cosTB")
Me.sinTB.Text = Me.calculator("sinTB")
End Sub 'ComputeButton_Click
Returns the value as false
Default constructor:
Use this constructor when you want to have
several CalcQuick objects that access the same
static members of the CalcEngine.
Constructor that resets the CalcEngine object.
Indicates whether the static members of the CalcEngine class will be cleared.
For internal CalcQuick use only.
Occurs when one of the FormulaInfo objects being
maintained by the CalcQuick instance has changed.
A property that gets/sets the auto calculation mode of the CalcQuick.
By default, the CalcQuick will not update other values when you change
a FormulaInfo object. By default, you explicitly call SetDirty()
of the CalcQuick instance to force calculations to be done the next time
they are required. Setting AutoCalc to True tells the CalcQuick to maintain
the dependency information necessary to automatically update
dependent formulas when values that affect these formulas change.
Gets or sets whether formulas should be checked for syntax during key substitutions. Default is true.
Prior to version 4.4, no syntax checking was performed during the initial parsing process of substituting
for keys (variable names enclosed in square brackets). This early syntax checking support has been added to
catch cases where a keys was not preceded (or followed) properly in the formula. This CheckKeys property
is available for backward compatibility. To maintain the exact parsing algorithm found in versions
prior to 4.4, set this property to false.
Maintains a set of modified flags indicating whether
any control has had a value changed.
Maintains a collection of FormulaInfo objects.
This Hashtable serves as the data store for the
CalcQuick instance. The keys are the strings used
to identify formulas and the values are FormulaInfo
objects that hold the information on each formula or value.
Determines whether the CalcEngine object of this CalcQuick should be disposed on disposing this object.
Default value is true.
A read-only property that gets the reference to the CalcEngine object being used by this CalcQuick instance.
A property that gets/sets character by which string starts with, are treated as
formulas when indexing a CalcQuick object.
If you use the technique of indexing the CalcQuick object
to set a varaible value, then you indicate that the value should be a
formula by starting the string with this character. If you do not want
to require your formulas to start with this character, then you will not
be able to use the indexing technique. Instead, you will have to call
ParseAndCompute directly to handle formulas not starting with this
character.
Maintains a mapping between the string key and the row
used in a CalcSheet to identify a FormulaInfo object.
Maintains a mapping between the string key and a
vector of numbers entered using a brace expression.
Maintains a mapping between the string key and the control
which is being used to identify a FormulaInfo object.
Maintains a mapping between the row used in a CalcSheet
and the string key used to identify a FormulaInfo object.
A method to reset all the keys registered with CalcQuickBase object.
Gets / sets formula values for CalcQuick.
The indexer used to identify the formula.
Using an indexer on the CalcQuick instance is the primary method
of setting a value to be used in a CalcQuick object. The string
used as the indexer is the key that you use to reference this formula
value in other formulas used in this CalcQuick instance.
Gets / sets whether the CalcQuick should throw an exception when a circular calculation is encountered.
If this property is True, the CalcQuick will throw an exception
when it detects a circular calculation. If ThrowCircularException is False, then
no exception is thrown and the calculation will loop recursively until Engine.MaximumRecursiveCalls
is exceeded.
Creates the object used by this CalQuick object.
Returns an instance of a CalcEngine object.
You can override this method and return a derived CalcEngine object use
by the derived CalcQuick object.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
A method that parses and computes a well-formed algebraic expression passed in.
The text of the formula.
The computed value.
You would use this method if you have a formula string which
contains only constants or library function references. Such formulas
do not depend upon other values. If you have registered a variable through
an indexer, then that variable can be used in a formula expression passed into this
method. This method will return the Exception text if an exception is thrown
during the computation.
A method that returns the formula string associated with the key passed in from a FormulaInfo object.
The Hashtable key associated with the FormulaInfo object.
The formula string may be the empty string if no formula is stored with this key.
A method to get the value of the cell referred. For internal CalcQuick use only.
Row index.
Column index.
(row, col) data.
CalcQuick does not expose a (row, col) data access model.
But since CalcEngine requires such a model, CalcQuick uses
a row, col access model internally, but only exposes the
formula Key model to access values.
Initializes any structures needed by this instance.
Indicates whether the static members of the CalcEngine class will be cleared.
A method that parses and computes a well-formed algebraic expression passed in.
The text of the formula.
The computed value.
You would use this method if you have a formula string which
contains only constants or library function references. Such formulas
do not depend upon other values. If you have registered a variable through
an indexer, then that variable can be used in a formula expression passed into this
method.
A method that recompute any formulas stored in the CalcQuick instance.
This method only has is used when AutoCalc is False. It loops through
all FormulaInfo objects stored in the CalcQuick object and recomputes
any formulas.
A method to force all calculations to be performed the next time the CalcQuick object is
accessed with an indexer requesting the value.
Each FormulaInfo object contained in the CalcQuick instance
has a calculation index that is checked any time the computed value is needed. If this index
is current, no calculation is done, and the last computed value is returned. If this index
is not current, the calculation is redone before the value is returned. Calling this method
guarantees that no FormulaInfo object's calculation indexes will be current.
A method to set value to the specified cell. For internal CalcQuick use only.
Loops through and updates all formula items that depend
on the FormulaInfo object pointed to by the key.
Identifies FormulaInfo object that triggered the update.
A method that wires the ParentObject after the CalcQuick object is created. For internal CalcQuick use only.
Get the idex of the first row in UsedRange
index of first row
get the index of the last row in UsedRange
index of last row
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code
Gets the first column index.
Index of first column
Gets the last column index / column count.
Index of last column
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code
An event handler that represents the method to handle the event.
This event is raised whenever an indexer is used on the CalcQuick object to assign
it a value or when a value is assigned as the result of a calculation being done.
Event argument class for the event.
The only constructor for QuickValueSetEventArgs.
This is the object that is used as the key value in the Hashtable to
identify the formula information. It is also the string you use in formulas (enclosed in brackets)
to reference a formula from another formula.
New value being assigned.
Indicates the reason the event is being raised. See FormulaInfoSetAction.
The reason the event was raised.
A property that gets/sets the Hashtable lookup object for the FormulaInfo object being changed.
A property that gets/sets the new value being set.
Flags the reason that quickValueSet was raised.
When QuickValueSet event is raised, it passes an
argument of FormulaInfoSetAction to indicate what was being assigned
to the CalcQuick object using an indexer.
A formula (string starting with FormulaCharacter) was assigned.
Something other than a formula was assigned.
A calculated value was assigned.
Typed Hashtable returning FormulaInfo objects.
Gets or sets the FormulaInfo with the specified obj.
The key to identify the given FormulaInfo.
FormulaInfo
CalcSheet represents a single worksheet in a workbook.
A CalcSheet plays the role of an Excel Worksheet. It maintains its own internal data object
to hold FormulaInfo objects used by the CalcEngine in its calculation work. The CalcSheet accesses
the raw data / formulas that you want to use in the calculations via the ICalcData interface.
Default constructor.
Constructor that initializes an internal object array to
hold data.
Number of rows in the data object.
Number of columns in the data object.
Constructor used during serialization.
This event is raised in SetValueRowCol.
This event should be raised by the implementer of ICalcData whenever a value changes.
Gets / sets a flag that indicates whether to compute dependent values
as cells change.
A read-only property that gets the column count.
Gets / sets the field delimiter for the
WriteSheetToFile method.
The default value is tab.
A read-only property that gets the CalcEngine object used by this CalcSheet.
Enables or disables saving changes within the CalcSheet.
A property that gets / sets the name used to refer to this sheet.
A read-only property that gets the row count.
Gets / sets a value through the ICalcData.GetValueRowCol
and ICalcData.SetValueRowCol implementation methods.
The row index.
The column index.
Creates a CalcSheet from a delimited text file
created by WriteSheetToFile.
The file name.
A CalcSheet instantiated with the file content.
Supports serialization.
Serialization information.
Describes source and destination of the given stream..
Returns the value at the row and column.
One-based row index.
One based column index.
The cell value.
Raises the CalculatedValueChanged event.
Includes the row, col, and value of the change.
This event should be raised any time a value changes.
Raises the ValueChanged event.
Includes the row, col, and value of the change.
This event should be raised any time a value changes.
Creates a CalcSheet object from the content of a StreamReader.
The StreamReader.
The newly created CalcSheet object.
A Virtual method to save the value through the ICalcData.SetValueRowCol implementation method
and raise the ValueChanged event.
The row index, one-based.
The column index, one-based.
The value.
A Virtual method to set a value at a given row and column.
Value to be set.
One-based row index.
One-based column index.
A Virtual method that can be used to handle subscribing to any base object events necessary for implementing the
ValueChanged event.
For example, when implementing ICalcData on a DataGrid-derived object,
you need to know when something in the DataGrid changes so you can raise the
required ICalcData.ValueChanged event. In WireParentObject, the DataGrid can
subscribe to its DataSource's change event to handle this requirement. If the
DataSource is a DataTable, then the DataTable.ColumnChanged event can fulfill
the requirement.
Get the idex of the first row in UsedRange
index of first row
get the index of the last row in UsedRange
index of last row
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code
Gets the first column index.
Index of first column
Gets the last column index / column count.
Index of last column
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code
Writes a delimited file.
The output file name.
The static Delimiter member specifies the field delimiter.
Rows are delimited by Environment.NewLine characters.
This method serializes formulas instead of computed values. To
write a file containing computed values, use the WriteValuesToFile method.
Writes this CalcSheet object to the given StreamWriter.
The StreamWriter.
Indicates whether to serialize formulas (False)
or computed values (True).
Writes this CalcSheet object with formulas serialized to the given StreamWriter.
The StreamWriter.
Serializes the data with computed values to a delimited
text file.
The file name.
The static Delimiter member specifies the field delimiter.
Rows are delimited by Environment.NewLine characters.
This method serializes computed values instead of formulas. To
write a file containing formulas, use the WriteSheetToFile method.
Calls SecurityPermission.Demand to find out if SecurityPermission is available.
True if SecurityPermission is available.
CalcWorkbook holds a collection of objects.
ArrayList of strings holding the CalcSheets names.
Initializes a new instance of the CalcWorkbook class.
The calc sheets.
Hashtable of key, value pairs for Namedrange values.
Initializes a new from a serialization stream.
An object that holds all the data needed to serialize or deserialize this instance.
Describes the source and destination of the serialized stream specified by info.
Gets or sets an Arraylist of CalcSheet objects used in this workbook.
Array of CalcSheets objects used in this workbook.
Gets/Sets the CalcEngine object.
The setter only sets once, and only if InitCalcWorkbook has been called
with a zero CalcSheet count.
Number of CalcSheets in this workbook.
Gets / sets a CalcSheet object with the given name.
The sheet name.
Gets / sets a CalcSheet object with the given index.
The sheet index.
A Virtual method to calculate all formulas in this workbook.
Removes all formulas in the given CalcSheet.
The CalcSheet.
Implements the ISerializable interface and returns the data needed to serialize the workbook.
A SerializationInfo object containing the information required to serialize the cell model.
A StreamingContext object containing the source and destination of the serialized stream.
A method that gets the integer ID of a CalcSheet.
The CalcSheet name.
The integer ID.
Creates a CalcWorkbook from a file written using WriteSSS.
Pathname of the file.
A CalcWorkbook object.
Writes a tab-delimited file holding the Workbook information.
The pathname of the file to be written.
Wrapper ArrayList that holds a collection of CalcSheets.
Default constructor.
Creates an CalcSheetList instance owned by the given workbook with the given CalcSheet list.
list of CalcSheets
The Workbook
Gets or sets the CalcSheet at the given index.
The sheet index.
Gets or sets the CalcSheet with a given name.
The sheet name.
A method that adds a new CalcSheet.
The CalcSheet to be added.
The index of the added CalcSheet.
Not supported.
Not supported.
Returns the index for a CalcSheet.
The name of the CalcSheet.
The index of the CalcSheet.
A method that removes a CalcSheet.
The CalcSheet to be removed.
Removes a CalcSheet.
The index of the CalcSheet to be removed.
The CalcSheets in this collection.
Returns a CalcSheet[].
An event handler that represents the method to handle the
event.
The source of the event.
A that contains the event data.
A class containing data for the ICalcData.ValueChanged event.
The constructor.
One-based row index for the value.
One-based col index for the value.
the value at the specified row,col.
A property that gets/sets One-base column index.
A property that gets/sets One-based row index.
A property that gets/sets the value.
Used for CalcEngineHelper
Returns a DateTime equivalent to the specified OLE Automation Date.
An OLE Automation Date value.
An object that represents the same date and time as d.
Converts the value of this instance to the equivalent OLE Automation date.
A double-precision floating-point number that contains an OLE Automation date equivalent to the value of this instance.
Specifies options for caching look up tables in HLookUp and VLookUp functions.
No caching is done.
Tables will be cached only for VLookUp.
Tables will be cached only for HLookUp.
Tables will be cached for both VLookUp and HLookUp.
Tables will be optimized for searching for exact matches. Set this flag if you expect your searches to find exact matches.
RangeInfo represents a rectangle array of cells that may contain formulas, strings, or numbers
that may be referenced by other formulas.
Constructs a RangeInfo instance with the given top, left, bottom and right values.
Top row index of this range.
Left column index of this range.
Bottom row index of this range.
Right column index of this range.
The range values must be one-based indexes.
A property that gets/sets the bottom row index of this range.
A property that gets/sets the left column index of this range.
A property that gets/sets the right row index of this range.
A property that gets/sets the top row index of this range.
A method to retrieve a range based on the numeric arguments passed in.
Top row index of this range.
Left column index of this range.
Bottom row index of this range.
Right column index of this range.
A RangeInfo object.
The range values must be one-based indexes.
GetAlphaLabel is a method that retrieves a string value for the column whose numerical index is passed in.
Number index such as 1, 5, 27.
Corresponding alphabets label like A, E, AA.
ICalcData defines the minimal interface that a data object must support in order to use
this formula engine.
A method that gets the data value from the specified row and column.
1-based index specifying the row index of the requested value.
1-based index specifying the column index of the requested data.
The data value at the given row and column index.
A method that sets the data value to the specified row and column.
The value.
One-based index specifying the row index of the value.
One-based index specifying the column index of the value.
A method that wires the ParentObject after the CalcEngine object is created or when a
RegisterGridAsSheet call is made.
This method is a callback to the ParentObject so it can have a chance
to subscribe to any change events it may need to implement ValueChanged properly.
Event for value changed
Used in conjunction with .
Essential Calculate supports column ranges of the form A:D as in =SUM(A:D) to represent all cells in columns
A, B, C and D from a ICalcData object. To get a value for the number of rows, the CalcEngine first checks to
see if the ICalcData object supports the ISheetData interface. If this interface is supported, the row
count used to determine the range is obtained through this interface. If the ICalcData object does not support
ISheetData, then the value of is used provided RowMaxCount > 0.
and the index of first and last rows and columns
is used.
Get the idex of the first row in UsedRange
index of first row
get the index of the last row in UsedRange
index of last row
Gets the row count.
Number of rows
Gets the first column index.
Index of first column
Gets the last column index / column count.
Index of last column
Gets the column count.
Number of columns
Encapsulates the properties that are needed to support multiple families of crossed-referenced grids.
This class is for internal use only.
Holds mapping from parent object to sheet token.
Holds mapping from sheet token to parent object.
Holds mapping from parent object to sheet name.
Holds mapping from sheet name to parent object.
Performs the calculation of LINEST formula.
Gets or sets the instance of .
Initialize the object for parsing operations.
An instance of .
This method is used to split the range and logical value when the range contains logical value.
Range with logical value(ex:\u0092C1:C3\"1,2\"m\u0092)
Spilt the range ex("C1:C3")
Split the logical value ex("\"1,2\"m")
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Contains the class for assembly information.
This class holds the name of the Syncfusion.Calculate.Base assembly and provides a helper
routine that helps with resolving types when loading a serialization stream and when
the framework probes for assemblies by reflection.
The full name of this assembly without version information, e.g. "Syncfusion.Grid".
A reference to the for the grid assembly.
The root namespace of this assembly. Used internally for locating resources within the assembly.
This delegate helps with resolving types and can be used as an event handler
for a event.
The source of the event.
The event data with information about the type.
A reference to the assembly where the type is located.
Use this handler when reading back types from a serialization stream
saved with an earlier version of this assembly.
public static GridModel LoadSoap(Stream s)
{
try
{
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(GridAssembly.AssemblyResolver);
SoapFormatter b = new SoapFormatter();
b.AssemblyFormat = FormatterAssemblyStyle.Simple;
GridModel t = b.Deserialize(s) as GridModel;
t.Modified = false;
return t;
}
finally
{
AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(GridAssembly.AssemblyResolver);
}
}