|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.extentech.ExtenXLS.FormulaHandle
public class FormulaHandle
Formula Handle allows for manipulation of Formulas within a WorkBook.
WorkBookHandle,
WorkSheetHandle,
CellHandle| Method Summary | |
|---|---|
boolean |
addCellToRange(String formulaLoc,
CellHandle handle)
Changes a range in a formula to expand until it includes the cell address from CellHandle. |
Object |
calculate()
Calculate the value of the formula and return it as an object Calling calculate will ignore the WorkBook formula calculation flags and forces calculation of the entire formula stack |
boolean |
changeFormulaLocation(String formulaLoc,
String newaddr)
Takes a string as a current formula location, and changes that pointer in the formula to the new string that is sent. |
boolean |
evaluatesToString()
If the Formula evaluates to a String, there will be a Stringrec attached to the Formula which contains the latest value. |
boolean |
getCalcAlways()
return the "Calculate Always" setting for this formula used for formulas that always need calculating such as TODAY |
String |
getCellAddress()
Returns the cell Address of the formula |
CellRange[] |
getCellRanges()
Initialize CellRanges referenced by this formula |
double |
getDoubleVal()
If the Formula evaluates to a double, return the value as an double. |
float |
getFloatVal()
If the Formula evaluates to a float, return the value as an float. |
com.extentech.formats.XLS.Formula |
getFormulaRec()
returns the low-level formula rec for this Formulahandle |
String |
getFormulaString()
Returns the Human-Readable Formula String |
int |
getIntVal()
If the Formula evaluates to an int, return the value as an int. |
String |
getOOXML()
generate the OOXML necessary to describe this formula OOXML element |
String[] |
getRanges()
get CellRange strings referenced by this formula |
String |
getStringVal()
If the Formula evaluates to a String, return the value as a String. |
Object |
getVal()
Return the value of the Formula |
boolean |
isArrayFormula()
|
boolean |
isErrorValue()
Utility method to determine if the calculation works out to an error value. |
boolean |
isSharedFormula()
return truth of "this formula is shared" |
static void |
moveCellRefs(FormulaHandle fmh,
int[] offsets)
Copy the formula references with offsets |
void |
setCalcAlways(boolean fAlwaysCalc)
set the "Calculate Always setting for this formula used for formulas that always need calculating such as TODAY |
void |
setFormula(String formulaString)
Sets the formula to a string passed in excel formula format. |
boolean |
setLocationLocked(String loc,
boolean l)
Sets the location lock on the Cell Reference at the specified location Used to prevent updating of the Cell Reference when Cells are moved. |
boolean |
setLocationPolicy(String loc,
int l)
Sets the location lock on the Cell Reference at the specified location Used to prevent updating of the Cell Reference when Cells are moved. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean setLocationLocked(String loc,
boolean l)
location - of the Cell Reference to be locked/unlockedlock - status setting
public boolean setLocationPolicy(String loc,
int l)
location - of the Cell Reference to be locked/unlockedlock - status setting
public String getCellAddress()
public String getFormulaString()
public String getStringVal()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedException
public Object getVal()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedException
public Object calculate()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedException
public void setFormula(String formulaString)
throws com.extentech.formats.XLS.FunctionNotSupportedException
formulaString - - String formatted as an excel formula, like Sum(A3+4)
com.extentech.formats.XLS.FunctionNotSupportedExceptionpublic boolean evaluatesToString()
public float getFloatVal()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedException
public double getDoubleVal()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedException
public int getIntVal()
throws com.extentech.formats.XLS.FunctionNotSupportedException
com.extentech.formats.XLS.FunctionNotSupportedException
public String[] getRanges()
throws com.extentech.formats.XLS.FormulaNotFoundException
com.extentech.formats.XLS.FormulaNotFoundException
public CellRange[] getCellRanges()
throws com.extentech.formats.XLS.FormulaNotFoundException
com.extentech.formats.XLS.FormulaNotFoundException
public boolean changeFormulaLocation(String formulaLoc,
String newaddr)
throws com.extentech.formats.XLS.FormulaNotFoundException
String - - range of Cells within Formula to modifyString - - new range of Cells within Formula
com.extentech.formats.XLS.FormulaNotFoundException
public boolean addCellToRange(String formulaLoc,
CellHandle handle)
throws com.extentech.formats.XLS.FormulaNotFoundException
String - - the Cell Range as a String to add the Cell toCellHandle - - the CellHandle to add to the range
com.extentech.formats.XLS.FormulaNotFoundException
public static void moveCellRefs(FormulaHandle fmh,
int[] offsets)
throws com.extentech.formats.XLS.FormulaNotFoundException
-
com.extentech.formats.XLS.FormulaNotFoundExceptionpublic String toString()
toString in class Objectpublic boolean isSharedFormula()
public boolean isArrayFormula()
public com.extentech.formats.XLS.Formula getFormulaRec()
public boolean isErrorValue()
public boolean getCalcAlways()
public void setCalcAlways(boolean fAlwaysCalc)
fAlwaysCalc - public String getOOXML()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||