https://issues.apache.org/bugzilla/show_bug.cgi?id=52158
Bug #: 52158 Summary: Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula by ValueRecordsAggregate Product: POI Version: 3.8-dev Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: HSSF AssignedTo: dev@poi.apache.org ReportedBy: jda...@strategicanalytics.com Classification: Unclassified Created attachment 27911 --> https://issues.apache.org/bugzilla/attachment.cgi?id=27911 source and data Attached is a zip file containing: Three class files: EventBasedExcelExtractor.java TextHSSFListener.java TestEventBasedExcelExtractor.java Two data files: oneSheet-good.xls - no exception, this file was produced manually (ie typed) oneSheet-bad.xls - throws exception below, this file was created with this line of code excelSheet.setFormula(row, column, excelFormula.toString()); where excelSheet is org.apache.poi.ss.usermodel.Sheet, row and column are int, excelFormula is StringBuffer To run, use one file as a program argument to TestEventBasedExcelExtractor Exception in thread "main" java.lang.RuntimeException: Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula by ValueRecordsAggregate, but it wasn't at org.apache.poi.ss.formula.ptg.ExpPtg.toFormulaString(ExpPtg.java:64) at org.apache.poi.ss.formula.FormulaRenderer.toFormulaString(FormulaRenderer.java:96) at org.apache.poi.hssf.model.HSSFFormulaParser.toFormulaString(HSSFFormulaParser.java:83) at eventbasedexcelextractor.TextHSSFListener.processRecord(TextHSSFListener.java:92) at org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener.processRecord(FormatTrackingHSSFListener.java:82) at org.apache.poi.hssf.eventusermodel.HSSFRequest.processRecord(HSSFRequest.java:112) at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:147) at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:106) at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEvents(HSSFEventFactory.java:65) at eventbasedexcelextractor.EventBasedExcelExtractor.triggerExtraction(EventBasedExcelExtractor.java:159) at eventbasedexcelextractor.EventBasedExcelExtractor.getText(EventBasedExcelExtractor.java:127) at eventbasedexcelextractor.TestEventBasedExcelExtractor.<init>(TestEventBasedExcelExtractor.java:39) at eventbasedexcelextractor.TestEventBasedExcelExtractor.main(TestEventBasedExcelExtractor.java:76) -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org