[Bug 61605] New: An error occurred when cloning a sheet containing a hyperlink

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 61605] New: An error occurred when cloning a sheet containing a hyperlink

Bugzilla from bugzilla@apache.org
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: [hidden email]
          Reporter: [hidden email]
  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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 61605] An error occurred when cloning a sheet containing a hyperlink

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61605

Dominik Stadler <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]