https://bz.apache.org/bugzilla/show_bug.cgi?id=61605
Bug ID: 61605
Summary: An error occurred when cloning a sheet containing a
hyperlink
Product: POI
Version: 3.16-FINAL
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 35410
--> https://bz.apache.org/bugzilla/attachment.cgi?id=35410&action=edit
Example Excel file
Hi, guys.
I use POI 3.16
When I clone a sheet that contains hyperlinks, I get an error message:
java.lang.IllegalStateException: The hyperlink for cell B5 references
relation rId1, but that didn't exist!
at
org.apache.poi.xssf.usermodel.XSSFHyperlink.<init>(XSSFHyperlink.java:71)
at
org.apache.poi.xssf.usermodel.XSSFSheet.initHyperlinks(XSSFSheet.java:254)
at org.apache.poi.xssf.usermodel.XSSFSheet.read(XSSFSheet.java:207)
at
org.apache.poi.xssf.usermodel.XSSFWorkbook.cloneSheet(XSSFWorkbook.java)
My code:
XSSFWorkbook template_wb;
XSSFSheet template_sh = null, source_sh = null;
//get Excel file as Blob from Oracle database
Blob lBlob = GetExcelTemplateAsBlob( PNHTemplateId, ExcelTemplateName );
lBlobStream = lBlob.getBinaryStream();
template_wb = new XSSFWorkbook( lBlobStream );
template_sh = template_wb.getSheetAt( 0 );
source_sh = template_wb.cloneSheet( 0 ); <- here I get an error
If the sheet does not contain hyperlinks, then all is successful.
Example of a file in an attachment.
Best regards.
Mike
--
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]