Lines 91-96
Link Here
|
91 |
import org.apache.poi.hssf.record.formula.eval.UnaryMinusEval; |
91 |
import org.apache.poi.hssf.record.formula.eval.UnaryMinusEval; |
92 |
import org.apache.poi.hssf.record.formula.eval.UnaryPlusEval; |
92 |
import org.apache.poi.hssf.record.formula.eval.UnaryPlusEval; |
93 |
import org.apache.poi.hssf.record.formula.eval.ValueEval; |
93 |
import org.apache.poi.hssf.record.formula.eval.ValueEval; |
|
|
94 |
import org.apache.poi.hssf.usermodel.HSSFSheet; |
94 |
|
95 |
|
95 |
/** |
96 |
/** |
96 |
* @author Amol S. Deshmukh < amolweb at ya hoo dot com > |
97 |
* @author Amol S. Deshmukh < amolweb at ya hoo dot com > |
Lines 369-378
Link Here
|
369 |
short col0 = a3dp.getFirstColumn(); |
370 |
short col0 = a3dp.getFirstColumn(); |
370 |
short row1 = a3dp.getLastRow(); |
371 |
short row1 = a3dp.getLastRow(); |
371 |
short col1 = a3dp.getLastColumn(); |
372 |
short col1 = a3dp.getLastColumn(); |
372 |
HSSFSheet xsheet = workbook.getSheetAt(a3dp.getExternSheetIndex()); |
373 |
Workbook wb = workbook.getWorkbook(); |
|
|
374 |
HSSFSheet xsheet = workbook.getSheetAt(wb.getSheetIndexFromExternSheetIndex(a3dp.getExternSheetIndex())); |
373 |
ValueEval[] values = new ValueEval[(row1 - row0 + 1) * (col1 - col0 + 1)]; |
375 |
ValueEval[] values = new ValueEval[(row1 - row0 + 1) * (col1 - col0 + 1)]; |
374 |
for (short x = row0; sheet != null && x < row1 + 1; x++) { |
376 |
for (short x = row0; xsheet != null && x < row1 + 1; x++) { |
375 |
HSSFRow row = sheet.getRow(x); |
377 |
HSSFRow row = xsheet.getRow(x); |
376 |
for (short y = col0; row != null && y < col1 + 1; y++) { |
378 |
for (short y = col0; row != null && y < col1 + 1; y++) { |
377 |
values[(x - row0) * (col1 - col0 + 1) + (y - col0)] = |
379 |
values[(x - row0) * (col1 - col0 + 1) + (y - col0)] = |
378 |
getEvalForCell(row.getCell(y), row, xsheet, workbook); |
380 |
getEvalForCell(row.getCell(y), row, xsheet, workbook); |