diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-10-15 07:40:29 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-10-15 07:40:29 +0000 |
commit | 75cfdc75daf0913be47b65002ecc0bdb356c7f94 (patch) | |
tree | 9dbd30483e7c8ffac3e43728e67e0f8a58db55c7 | |
parent | 76c0aaa3388ef5c912245825393314cabf205085 (diff) | |
download | poi-75cfdc75daf0913be47b65002ecc0bdb356c7f94.tar.gz poi-75cfdc75daf0913be47b65002ecc0bdb356c7f94.zip |
[github-264] bug in link external workbook. This closes #264
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894275 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index b61cd50129..2b67475b0b 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -1994,7 +1994,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su int externalLinkIdx=-1; if (!getCreationHelper().getReferencedWorkbooks().containsKey(name)){ externalLinkIdx = this.getNextPartNumber(XSSFRelation.EXTERNAL_LINKS, - this.getPackagePart().getPackage().getPartsByContentType(XSSFRelation.EXTERNAL_LINKS.getContentType()).size()); + this.getPackagePart().getPackage().getPartsByContentType(XSSFRelation.EXTERNAL_LINKS.getContentType()).size() + 1); POIXMLDocumentPart.RelationPart rp = this.createRelationship(XSSFRelation.EXTERNAL_LINKS, xssfFactory, externalLinkIdx, false); ExternalLinksTable linksTable = rp.getDocumentPart(); linksTable.setLinkedFileName(name); |