You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2022/03/22 11:19:43 UTC
[Bug 65973] New: Link in merged cells causes exception
https://bz.apache.org/bugzilla/show_bug.cgi?id=65973
Bug ID: 65973
Summary: Link in merged cells causes exception
Product: POI
Version: 5.2.0-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: SXSSF
Assignee: dev@poi.apache.org
Reporter: juergen.lampe@partner.commerzbank.com
Target Milestone: ---
Link in merged cells doesn't match the pattern CELL_REF_PATTERN in
CellReference and this causes
java.lang.IllegalArgumentException: Invalid CellReference: H9:L9
at
org.apache.poi.ss.util.CellReference.separateRefParts(CellReference.java:403)
at org.apache.poi.ss.util.CellReference.<init>(CellReference.java:118)
at
org.apache.poi.xssf.usermodel.XSSFSheet.removeOverwritten(XSSFSheet.java:3086)
at
org.apache.poi.xssf.usermodel.XSSFSheet.shiftRows(XSSFSheet.java:2975)
at
org.apache.poi.xssf.usermodel.XSSFSheet.shiftRows(XSSFSheet.java:2950)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 65973] Link in merged cells causes exception
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65973
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
I added r1899129 which is a partial fix for case where row shifting runs into
individual hyperlinks that span multiple cells. It should help in your case
because your cell range is all on row 9 (H9:L9).
A workaround might be for you to iterate through the hyperlinks and replace the
ones that have cell ranges with ones that are specific to 1 cell. XSSFSheet has
public List<XSSFHyperlink> getHyperlinkList() which returns an unmodifiable
list but you can try to use addHyperlink and removeHyperlink to add hyperlinks
that are for one cell only and remove hyperlinks that are for multiple cells.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 65973] Link in merged cells causes exception
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65973
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Component|SXSSF |XSSF
Resolution|--- |FIXED
--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
I added r1899137, 1899138 and r1899139 (and a few other commits prior to this)
and they seem to indicate that my changes cover some of the most obvious
scenarios.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org