|
ActiveXLS v6.4.0 API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | CONST | CONSTR | METHOD | DETAIL: CONST | CONSTR | METHOD |
System.ObjectActiveXLS.Formula
This class is used for formulas computation.
Constructor Summary | |
Formula()
Defines a new instance of the object that parses formulas. |
|
Formula(ExcelDocument excel)
Defines a new instance of the object that parses formulas. |
|
Formula(ExcelDocument excel,
bool bR1C1ReferenceStyle)
Defines a new instance of the object that parses formulas. |
|
Formula(ExcelDocument excel,
ActiveXLS.OpenXML.Workbook workbook)
Defines a new instance of the object that parses formulas. |
Method Summary | |
FormulaResult |
computeFormula(System.String sFormula,
ExcelWorksheet currentWorksheet_arg,
ExcelWorksheet formulaWorksheet_arg,
int formulaRow,
int formulaColumn)
Returns the result of an Excel formula; the formula should not start with the = (equal) sign like in Excel. |
static int[] |
get2DCellElements(System.String sCellReference)
Returns an array of integers containing the elements of the specified sCellReference |
static int[] |
get2DCellElementsR1C1style(System.String sCellReference,
int formulaRow,
int formulaColumn)
Returns an array of integers containing the elements of the specified sCellReference |
static int[] |
get2DColumnCellElementsR1C1style(System.String sCellReference,
int formulaRow,
int formulaColumn)
Returns an array of integers containing the elements of the specified sCellReference |
static int[] |
get2DColumnRangeElementsR1C1style(System.String sRange,
int formulaRow,
int formulaColumn)
Returns an array of integers containing the elements of the specified sRange |
static int[] |
get2DRangeElements(System.String sRange)
Returns an array of integers containing the elements of the specified sRange |
static int[] |
get2DRangeElementsR1C1style(System.String sRange,
int formulaRow,
int formulaColumn)
Returns an array of integers containing the elements of the specified sRange |
static int[] |
get2DRowCellElementsR1C1style(System.String sCellReference,
int formulaRow,
int formulaColumn)
Returns an array of integers containing the elements of the specified sCellReference |
static int[] |
get2DRowRangeElementsR1C1style(System.String sRange,
int formulaRow,
int formulaColumn)
Returns an array of integers containing the elements of the specified sRange |
System.Object[] |
get3DCellElements(System.String sCellReference)
Returns an array of objects containing the elements of the specified sCellReference |
System.Object[] |
get3DCellElementsR1C1style(System.String sCellReference,
int formulaRow,
int formulaColumn)
Returns an array of objects containing the elements of the specified sCellReference |
System.Object[] |
get3DColumnRangeElementsR1C1style(System.String sRange,
int formulaRow,
int formulaColumn)
Returns an array of objects containing the elements of the specified sRange |
System.Object[] |
get3DRangeElements(System.String sRange)
Returns an array of objects containing the elements of the specified sRange |
System.Object[] |
get3DRangeElementsR1C1style(System.String sRange,
int formulaRow,
int formulaColumn)
Returns an array of objects containing the elements of the specified sRange |
System.Object[] |
get3DRowRangeElementsR1C1style(System.String sRange,
int formulaRow,
int formulaColumn)
Returns an array of objects containing the elements of the specified sRange |
static int |
getColumnNumberFromLetters(System.String sColumnName)
Returns the index of the column identified by sColumnName |
static int |
getColumnNumberFromLetters(System.StringBuffer sColumnName)
|
ExcelName |
getExcelName(System.String sName)
Returns the ExcelName with the specified name. |
static System.String |
getLettersFromColumnNumber(int nColumnNumber)
Returns the column name corresponding to the nColumnNumber index |
static bool |
Is2DCellReference(System.String sValue)
Returns true if the sValue is a simple cell reference (e.g. A1). |
static bool |
Is2DCellReferenceR1C1style(System.String sValue)
Returns true if the sValue is a simple cell reference in R1C1 reference style(e.g. |
static bool |
Is2DColumnRange(System.String sRange)
Returns true if the sRange is a column range. |
static bool |
Is2DColumnRangeR1C1style(System.String sValue)
Returns true if the sValue is a simple column range reference in R1C1 reference style(e.g. C[1]:C[2]). |
static bool |
Is2DRange(System.String sValue)
Returns true if the sValue is a simple range reference (e.g. A1:B9). |
static bool |
Is2DRangeR1C1style(System.String sValue)
Returns true if the sValue is a simple range reference in R1C1 reference style (e.g. R1C1:R9C2). |
static bool |
Is2DRowRange(System.String sRange)
Returns true if the sRange is a simple row range (e.g. 4:6) |
static bool |
Is2DRowRangeR1C1style(System.String sValue)
Returns true if the sRange is a simple row range in R1C1 reference style (e.g. R4:R6). |
static bool |
Is3DCellReference(System.String sValue)
Returns true if the sValue is a complex cell reference (e.g. Sheet1!A1). |
static bool |
Is3DCellReferenceR1C1style(System.String sValue)
Returns true if the sValue is a complex cell reference in (e.g. Sheet1!R1C1). |
static bool |
Is3DColumnRangeR1C1style(System.String sValue)
Returns true if the sValue is a complex column range reference in R1C1 reference style(e.g. Sheet1!C[1]:C[2]). |
static bool |
Is3DRange(System.String sValue)
Returns true if the sValue is a complex range reference (e.g. Sheet1!A1:B9). |
static bool |
Is3DRangeR1C1style(System.String sValue)
Returns true if the sValue is a complex range reference in R1C1 reference style (e.g. Sheet1!R1C1:R9C2). |
static bool |
Is3DRowRangeR1C1style(System.String sValue)
Returns true if the sRange is a complex row range in R1C1 reference style (e.g. Sheet1!R4:R6). |
bool |
IsArray(System.String sValue)
Returns true if the sValue represents an Excel array (e.g. {1,2,3} ) |
static bool |
IsBoolean(System.String sValue)
Returns true if the sValue represents a bool value. |
static bool |
IsDouble(System.String sValue)
Returns true if the sValue represents a double value. |
static bool |
isError(System.String sValue)
Returns whether or not sValue is one of the errors recognized by Excel |
bool |
IsFunction(System.String token)
Returns true if the token represents a name of a function recognized by Microsoft Excel |
static bool |
IsInteger(System.String sValue)
Returns true if the sValue represents an integer value. |
bool |
IsName(System.String sValue)
Returns true if the string |
static bool |
IsString(System.String sValue)
Returns true if the sValue represents a string value. |
List[] |
parse_formula(System.String sFormula,
int nInitialClass,
int nFormulaRow,
int nFormulaColumn,
bool bNameX,
bool bBIFF12)
Internal use only |
static System.String |
SheetNameFromCanonicalExpression(System.String sSheetName)
Returns the original sheet name from a string that represents the sheet name in canonical expression. |
static System.String |
SheetNameToCanonicalExpression(System.String sSheetName)
Returns the sheet name in canonical expression. |
Constructor Detail |
public Formula()
public Formula(ExcelDocument excel)
excel
- the ExcelDocument object that contains the formulas that will be parsedpublic Formula(ExcelDocument excel, bool bR1C1ReferenceStyle)
excel
- the ExcelDocument object that contains the formulas that will be parsedbR1C1ReferenceStyle
- true if the formulas contains references that are in R1C1 style (e.g. SUM(R1C1:R2C4))public Formula(ExcelDocument excel, ActiveXLS.OpenXML.Workbook workbook)
excel
- the ExcelDocument object that contains the formulas that will be parsedworkbook
- the internal workbook of the Microsoft Office 2007 documentMethod Detail |
public List[] parse_formula(System.String sFormula, int nInitialClass, int nFormulaRow, int nFormulaColumn, bool bNameX, bool bBIFF12)
public static System.String SheetNameToCanonicalExpression(System.String sSheetName)
sSheetName
- the original sheet name
public bool IsFunction(System.String token)
token
represents a name of a function recognized by Microsoft Excel
token
- the value to be checked .
public static bool IsInteger(System.String sValue)
sValue
represents an integer value.
sValue
- the value to be checked .
public static bool IsDouble(System.String sValue)
sValue
represents a double value.
sValue
- the value to be checked .
public static bool IsBoolean(System.String sValue)
sValue
represents a bool value. Boolean values are "True" or "False" - case insensitive.
sValue
- the value to be checked .
public static bool Is2DCellReference(System.String sValue)
sValue
is a simple cell reference (e.g. A1).
sValue
- the cell reference .
sValue
is a simple cell reference (such as A1 or D9 or IV65536).public static bool Is2DRange(System.String sValue)
sValue
is a simple range reference (e.g. A1:B9).
sValue
- the range reference .
sValue
is a simple range reference (such as A1:B9).public static bool Is3DCellReference(System.String sValue)
sValue
is a complex cell reference (e.g. Sheet1!A1).
sValue
- the cell reference .
sValue
is a complex cell reference (such as Sheet1!A1 or Sheet2!D9 or Sheet3!IV65536).public static bool Is3DRange(System.String sValue)
sValue
is a complex range reference (e.g. Sheet1!A1:B9).
sValue
- the range reference .
sValue
is a complex range reference (such as Sheet1!A1:B9).public bool IsName(System.String sValue)
sValue
- the string whose value will be tested if it represents an Excel Name.
public static bool IsString(System.String sValue)
sValue
represents a string value. A string value is any string that starts and ends with " (double quotes)
sValue
- the value to be checked .
public bool IsArray(System.String sValue)
sValue
represents an Excel array (e.g. {1,2,3} )
sValue
- the value to be checked .
public static System.String SheetNameFromCanonicalExpression(System.String sSheetName)
sSheetName
- the sheet name in canonical expression
public static int getColumnNumberFromLetters(System.String sColumnName)
sColumnName
sColumnName
- the column name; it can be A, B, C to IV
public static int getColumnNumberFromLetters(System.StringBuffer sColumnName)
public static System.String getLettersFromColumnNumber(int nColumnNumber)
nColumnNumber
index
nColumnNumber
- the column index
public static int[] get2DCellElements(System.String sCellReference)
sCellReference
sCellReference
- the range whose elements will be returned.
public static int[] get2DRangeElements(System.String sRange)
sRange
sRange
- the range whose elements will be returned.
public System.Object[] get3DCellElements(System.String sCellReference)
sCellReference
sCellReference
- the range whose elements will be returned.
public System.Object[] get3DRangeElements(System.String sRange)
sRange
sRange
- the range whose elements will be returned.
public static bool Is2DRowRange(System.String sRange)
sRange
is a simple row range (e.g. 4:6)
sRange
- the range .
public static bool Is2DColumnRange(System.String sRange)
sRange
is a column range.
sRange
- the range .
public FormulaResult computeFormula(System.String sFormula, ExcelWorksheet currentWorksheet_arg, ExcelWorksheet formulaWorksheet_arg, int formulaRow, int formulaColumn)
sFormula
- - the formula to be computed ( e.g. SUM(SQRT(SUM(WKS2!$B2:C$7))) )currentWorksheet_arg
- - the ExcelWorksheet that the TableReference belongs toformulaWorksheet_arg
- - the ExcelWorksheet that the formula belongs toformulaRow
- - the row number of the cell that the formula belongs toformulaColumn
- - the column number of the cell that the formula belongs to
System.Exception
public ExcelName getExcelName(System.String sName)
sName
- the string containing the name of the ExcelName.
public static bool isError(System.String sValue)
sValue
- a string value to be checked if represents an Excel error
public static bool Is2DCellReferenceR1C1style(System.String sValue)
sValue
is a simple cell reference in R1C1 reference style(e.g. R1C1).
sValue
- the cell reference .
sValue
is a simple cell reference in R1C1 reference style (such as R1C1 or R9C4 or R65536C256).public static bool Is2DRangeR1C1style(System.String sValue)
sValue
is a simple range reference in R1C1 reference style (e.g. R1C1:R9C2).
sValue
- the range reference .
sValue
is a simple range reference in R1C1 reference style (such as R1C1:R9C2).public static bool Is2DRowRangeR1C1style(System.String sValue)
sRange
is a simple row range in R1C1 reference style (e.g. R4:R6).
sValue
- the range .
public static bool Is2DColumnRangeR1C1style(System.String sValue)
sValue
is a simple column range reference in R1C1 reference style(e.g. C[1]:C[2]).
sValue
- the column range reference .
sValue
is a simple column range reference in R1C1 reference style (such as C[1]:C[2] or C3:C4).public static bool Is3DCellReferenceR1C1style(System.String sValue)
sValue
is a complex cell reference in (e.g. Sheet1!R1C1).
sValue
- the cell reference .
sValue
is a complex cell reference in R1C1 reference style (such as Sheet1!R1C1 or Sheet2!R9C4 or Sheet3!R65536C256).public static bool Is3DRangeR1C1style(System.String sValue)
sValue
is a complex range reference in R1C1 reference style (e.g. Sheet1!R1C1:R9C2).
sValue
- the range reference .
sValue
is a complex range reference in R1C1 reference style (such as Sheet1!R1C1:R9C2).public static bool Is3DRowRangeR1C1style(System.String sValue)
sRange
is a complex row range in R1C1 reference style (e.g. Sheet1!R4:R6).
sValue
- the range .
public static bool Is3DColumnRangeR1C1style(System.String sValue)
sValue
is a complex column range reference in R1C1 reference style(e.g. Sheet1!C[1]:C[2]).
sValue
- the column range reference .
sValue
is a complex column range reference in R1C1 reference style (such as Sheet1!C[1]:C[2] or Sheet1!C3:C4).public static int[] get2DCellElementsR1C1style(System.String sCellReference, int formulaRow, int formulaColumn)
sCellReference
sCellReference
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public static int[] get2DRangeElementsR1C1style(System.String sRange, int formulaRow, int formulaColumn)
sRange
sRange
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public static int[] get2DRowCellElementsR1C1style(System.String sCellReference, int formulaRow, int formulaColumn)
sCellReference
sCellReference
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public static int[] get2DColumnCellElementsR1C1style(System.String sCellReference, int formulaRow, int formulaColumn)
sCellReference
sCellReference
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public static int[] get2DRowRangeElementsR1C1style(System.String sRange, int formulaRow, int formulaColumn)
sRange
sRange
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public static int[] get2DColumnRangeElementsR1C1style(System.String sRange, int formulaRow, int formulaColumn)
sRange
sRange
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public System.Object[] get3DCellElementsR1C1style(System.String sCellReference, int formulaRow, int formulaColumn)
sCellReference
sCellReference
- the cell reference whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public System.Object[] get3DRangeElementsR1C1style(System.String sRange, int formulaRow, int formulaColumn)
sRange
sRange
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public System.Object[] get3DRowRangeElementsR1C1style(System.String sRange, int formulaRow, int formulaColumn)
sRange
sRange
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
public System.Object[] get3DColumnRangeElementsR1C1style(System.String sRange, int formulaRow, int formulaColumn)
sRange
sRange
- the range whose elements will be returned.formulaRow
- - the row number of the cell that formula belongs toformulaColumn
- - the column number of the cell that formula belongs to
|
Copyright 2009 On Time Computing Solutions | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | CONST | CONSTR | METHOD | DETAIL: CONST | CONSTR | METHOD |