https://issues.apache.org/bugzilla/show_bug.cgi?id=49529
Summary: HSSFWorkbook.cloneSheet after createDrawingPatriarch
-> Exception
Product: POI
Version: 3.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25668)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25668)
Excel workbook used to reproduce the bug.
If I open an existing workbook with one sheet and then create a drawing
patriarch for the sheet, I cannot clone the sheet anymore.
Simple code to reproduce the bug :
public static void main(String[] args) {
try {
Workbook workbook = WorkbookFactory.create(new
FileInputStream("C:\\test.xls"));
workbook.getSheetAt(0).createDrawingPatriarch();
workbook.cloneSheet(0);
System.out.println("OK");
}
catch(Exception e) {
e.printStackTrace();
}
}
It produces this exception :
java.lang.IllegalStateException: EOF - next record not available
at
org.apache.poi.hssf.record.RecordInputStream.nextRecord(RecordInputStream.java:190)
at org.apache.poi.hssf.record.Record.cloneViaReserialise(Record.java:88)
at
org.apache.poi.hssf.record.AbstractEscherHolderRecord.clone(AbstractEscherHolderRecord.java:150)
at org.apache.poi.hssf.model.Sheet.cloneSheet(Sheet.java:375)
at org.apache.poi.hssf.usermodel.HSSFSheet.cloneSheet(HSSFSheet.java:121)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:662)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.cloneSheet(HSSFWorkbook.java:87)
--
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: [email protected]
For additional commands, e-mail: [email protected]