-
Bug
-
Resolution: Fixed
-
Normal
-
5.5.0, 5.6.0
-
None
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
Run keikai with attached sample1.xlsx
Current Result
io.keikai.importer.ImportException: Fail to import cell B3 in sheet Sheet1 from book sample1.xlsxio.keikai.importer.ImportException: Fail to import cell B3 in sheet Sheet1 from book sample1.xlsx at io.keikai.importer.XlsxImporter.imports(XlsxImporter.java:319) at io.keikai.range.impl.imexp.ExcelImportAdapter.imports(ExcelImportAdapter.java:48) at io.keikai.range.impl.imexp.AbstractImporter.imports(AbstractImporter.java:57) at io.keikai.ui.Spreadsheet.getSBook(Spreadsheet.java:675) at io.keikai.ui.Spreadsheet.getSelectedSSheet(Spreadsheet.java:854) ... caused by: java.lang.NullPointerExceptionjava.lang.NullPointerException at io.keikai.importer.XlsxImporter.importCell(XlsxImporter.java:1768) at io.keikai.importer.XlsxImporter.importRow(XlsxImporter.java:1714) at io.keikai.importer.XlsxImporter.imports(XlsxImporter.java:287) at io.keikai.range.impl.imexp.ExcelImportAdapter.imports(ExcelImportAdapter.java:48) at io.keikai.range.impl.imexp.AbstractImporter.imports(AbstractImporter.java:57)
Expected Result
no exception, cell values handled in a similar way to range references (sample2.xlsx) to avoid blocking the UI
Debug Information
Happens when a formula in a Cell (ex C3) generates results for other cells (C4, C5, C6, etc)
io.keikai.importer.XlsxImporter.importCell(XlsxCellExtractor, int, SSheet)
if (formulaValue instanceof String) { if (formulaValue instanceof String) { cell.setFormulaValue((String) formulaValue);
formulaValue is null due only the first cell (the original cell holding the =indirect formula) having a fonction as value.
The following cells are automatically generated by the spreadsheet (in Excel), and so have no value.
This is similar to the direct reference (sample2.xlsx) which works in keikai by hard-copying the content of the target cells during import then discarding the formula
(same result using the "D3:D10" notation, see sample3.xlsx)
Workaround