https://bz.apache.org/bugzilla/show_bug.cgi?id=58510
Bug ID: 58510
Summary: Comment on a cell creates a RuntimeException
Product: POI
Version: 3.13-dev
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 33190
--> https://bz.apache.org/bugzilla/attachment.cgi?id=33190&action=edit
The file which is causing the exception.
I have a Excel 2010 file with only one cell that have a comment on it (added
with a right-click on the cell).
If I copy the cell into the clipBoard (with right-click "copy") and then paste
into my application which find the Excel format in the clipboard and extract
the content.
The content is then given to a HSSFWorkbook :
new HSSFWorkbook(new ByteArrayInputStream(((ByteBuffer)
clipboard.getContent(excelFormat)).array()));
If I have no comment, everything is fine, otherwise I have this Exception :
"java.lang.RuntimeException: Unexpected record type
(org.apache.poi.hssf.record.NoteRecord)
at
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:97)
at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:217)
at
org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:156)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:354)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:400)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:381)"
The file is in attachment.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]