diff options
-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); |