/** * Gets the raw bytes for the formula. This will include the * parsed tokens array. Used when copying spreadsheets * * @return the raw record data */ public byte[] getFormulaData() throws FormulaException { if (!getSheet().getWorkbookBof().isBiff8()) { throw new FormulaException(FormulaException.BIFF8_SUPPORTED); } // Data is already the formula data, so don't do any more manipulation return data; }
if (formattingRecords.isDate(fr.getXFIndex())) cell = new DateFormulaRecord(nfr, formattingRecords, workbook,
if (formattingRecords.isDate(fr.getXFIndex())) cell = new DateFormulaRecord(nfr, formattingRecords, workbook,
/** * Gets the raw bytes for the formula. This will include the * parsed tokens array. Used when copying spreadsheets * * @return the raw record data */ public byte[] getFormulaData() throws FormulaException { if (!getSheet().getWorkbookBof().isBiff8()) { throw new FormulaException(FormulaException.BIFF8_SUPPORTED); } // Data is already the formula data, so don't do any more manipulation return data; }
if (formattingRecords.isDate(nfr.getXFIndex())) cell = new DateFormulaRecord(nfr, formattingRecords, workbook,
/** * Gets the formula as an excel string * * @return the formula as an excel string * @exception FormulaException */ public String getFormula() throws FormulaException { // Note that the standard information was lopped off by the NumberFormula // record when creating this formula if (formulaString == null) { byte[] tokens = new byte[data.length - 16]; System.arraycopy(data, 16, tokens, 0, tokens.length); FormulaParser fp = new FormulaParser (tokens, this, externalSheet, nameTable, getSheet().getWorkbook().getSettings()); fp.parse(); formulaString = fp.getFormula(); } return formulaString; }
if (formattingRecords.isDate(nfr.getXFIndex())) cell = new DateFormulaRecord(nfr, formattingRecords, workbook,
/** * Gets the formula as an excel string * * @return the formula as an excel string * @exception FormulaException */ public String getFormula() throws FormulaException { // Note that the standard information was lopped off by the NumberFormula // record when creating this formula if (formulaString == null) { byte[] tokens = new byte[data.length - 16]; System.arraycopy(data, 16, tokens, 0, tokens.length); FormulaParser fp = new FormulaParser (tokens, this, externalSheet, nameTable, getSheet().getWorkbook().getSettings()); fp.parse(); formulaString = fp.getFormula(); } return formulaString; }