diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java index 95f0faaa14..8d90c78cce 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java @@ -241,9 +241,9 @@ public class ReadOnlySharedStringsTable extends DefaultHandler implements Shared if ("sst".equals(localName)) { String count = attributes.getValue("count"); - if(count != null) this.count = Integer.parseInt(count); + if(count != null) this.count = (int) Long.parseLong(count); String uniqueCount = attributes.getValue("uniqueCount"); - if(uniqueCount != null) this.uniqueCount = Integer.parseInt(uniqueCount); + if(uniqueCount != null) this.uniqueCount = (int) Long.parseLong(uniqueCount); this.strings = new ArrayList<>(this.uniqueCount); characters = new StringBuilder(64);