Hi there,
I used the following code to grab an instance of HSSFPatriarch (to create a
HSSFComment in the sheet).
HSSFPatriarch patr = sheet.getDrawingPatriarch();
if (patr == null) {
patr = sheet.createDrawingPatriarch();
}
However, I get the following exception thrown from
"sheet.getDrawingPatriarch()". Does anybody have an idea of why this happening?
thanks a lot,
-david
Exception in thread "main" java.lang.NullPointerException
at
org.apache.poi.hssf.record.AbstractEscherHolderRecord.convertRawBytesToEscherRec
ords(AbstractEscherHolderRecord.java:73)
at
org.apache.poi.hssf.record.DrawingGroupRecord.processChildRecords(DrawingGroupRe
cord.java:83)
at
org.apache.poi.hssf.model.Workbook.findDrawingGroup(Workbook.java:2227)
at
org.apache.poi.hssf.usermodel.HSSFSheet.getDrawingEscherAggregate(HSSFSheet.java
:1531)
at
org.apache.poi.hssf.usermodel.HSSFSheet.getDrawingPatriarch(HSSFSheet.java:1565)
at
icn.bellaliant.parser.msexcel.test.CellComments.createComment(CellComments.java:
38)
at
icn.bellaliant.parser.msexcel.test.CellComments.main(CellComments.java:80)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]