/** * Gets the raw bytes for the formula. This will include the * parsed tokens array * * @return the raw record data */ public byte[] getFormulaData() throws FormulaException { if (!getSheet().getWorkbookBof().isBiff8()) { throw new FormulaException(FormulaException.BIFF8_SUPPORTED); } // Lop off the standard information byte[] d = new byte[data.length - 6]; System.arraycopy(data, 6, d, 0, data.length - 6); return d; }
/** * Gets the raw bytes for the formula. This will include the * parsed tokens array * * @return the raw record data */ public byte[] getFormulaData() throws FormulaException { if (!getSheet().getWorkbookBof().isBiff8()) { throw new FormulaException(FormulaException.BIFF8_SUPPORTED); } // Lop off the standard information byte[] d = new byte[data.length - 6]; System.arraycopy(data, 6, d, 0, data.length - 6); return d; }
/** * Gets the formula as an excel string * * @return the formula as an excel string * @exception FormulaException */ public String getFormula() throws FormulaException { if (formulaString == null) { byte[] tokens = new byte[data.length - 22]; System.arraycopy(data, 22, tokens, 0, tokens.length); FormulaParser fp = new FormulaParser (tokens, this, externalSheet, nameTable, getSheet().getWorkbook().getSettings()); fp.parse(); formulaString = fp.getFormula(); } return formulaString; } }
/** * Gets the formula as an excel string * * @return the formula as an excel string * @exception FormulaException */ public String getFormula() throws FormulaException { if (formulaString == null) { byte[] tokens = new byte[data.length - 22]; System.arraycopy(data, 22, tokens, 0, tokens.length); FormulaParser fp = new FormulaParser (tokens, this, externalSheet, nameTable, getSheet().getWorkbook().getSettings()); fp.parse(); formulaString = fp.getFormula(); } return formulaString; } }