net.sf.jxls.formula
Class CommonFormulaResolver
java.lang.Object
net.sf.jxls.formula.BaseFormulaResolver
net.sf.jxls.formula.CommonFormulaResolver
- All Implemented Interfaces:
- FormulaResolver
public class CommonFormulaResolver
- extends BaseFormulaResolver
Implementation of FormulaResolver interface resolving formulas containing list range and label cell references
like $[SUM(@employees.payment@)] and also formulas with direct cell references like $[SUM(E5)]
- Author:
- Leonid Vysochyn
|
Method Summary |
static java.lang.String |
replaceFormulaPart(java.lang.String formulaPart,
java.lang.String refCell,
java.lang.String newCell)
|
java.lang.String |
resolve(Formula sourceFormula,
WorkbookCellFinder cellFinder)
This implementation first checks are there any list ranges in the source formula. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommonFormulaResolver
public CommonFormulaResolver()
resolve
public java.lang.String resolve(Formula sourceFormula,
WorkbookCellFinder cellFinder)
- This implementation first checks are there any list ranges in the source formula.
If source formula contains any list ranges then resolve original formula by replacing all list range names with corresponding cells.
If there is no list ranges in the source formula then replace all transformed cells with their transformation results
also trying to detect and put corresponding cell ranges (like a10:a20 or a10:h10 for example)
- Parameters:
sourceFormula - cellFinder -
- Returns:
- Adjusted formula string
replaceFormulaPart
public static java.lang.String replaceFormulaPart(java.lang.String formulaPart,
java.lang.String refCell,
java.lang.String newCell)
Copyright © 2005-2013 jXLS Team. All Rights Reserved.