diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java index 9af9977cd6..1d440d2be2 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java @@ -374,10 +374,13 @@ public final class XSSFCell extends CellBase { rt = new XSSFRichTextString(_cell.isSetV() ? _cell.getV() : ""); } else { if (_cell.isSetV()) { - int idx = Integer.parseInt(_cell.getV()); - rt = new XSSFRichTextString(_sharedStringSource.getEntryAt(idx)); - } - else { + try { + int idx = Integer.parseInt(_cell.getV()); + rt = new XSSFRichTextString(_sharedStringSource.getEntryAt(idx)); + } catch(Throwable t) { + rt = new XSSFRichTextString(""); + } + } else { rt = new XSSFRichTextString(""); } }