https://bz.apache.org/bugzilla/show_bug.cgi?id=66827

            Bug ID: 66827
           Summary: Exception on loading Excel xslx-file with cell comment
           Product: POI
           Version: 5.2.3-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: POI Overall
          Assignee: dev@poi.apache.org
          Reporter: mg.fo...@jdotsoft.com
  Target Milestone: ---

Steps to reproduce:
1. Create cell comment in Excel.
2. Example xl/comment1.xml extracted from xslx (formatted):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main";>
  <authors>
    <author>Author</author>
  </authors>
  <commentList>
    <comment ref="A3" authorId="0">
      <text>
        <r>
          <rPr>
            <b />
            <sz val="9" />
            <color indexed="81" />
            <rFont val="Tahoma" />
            <charset val="1" />
          </rPr>
          <t>AGNC via Excel</t>
        </r>
      </text>
    </comment>
  </commentList>
</comments>
3. Load this Excel file via POI.
4. Exception thrown on loading this cell comment:
Exception in thread "Thread-2"
org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException: string value
'Text' is not a valid enumeration value for ST_ObjectType in namespace
urn:schemas-microsoft-com:office:excel
        at
org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx.set_text(JavaStringEnumerationHolderEx.java:40)
        at
org.apache.xmlbeans.impl.values.XmlObjectBase.update_from_wscanon_text(XmlObjectBase.java:1121)
        at
org.apache.xmlbeans.impl.values.XmlObjectBase.check_dated(XmlObjectBase.java:1250)
        at
org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx.getEnumValue(JavaStringEnumerationHolderEx.java:60)
        at
com.microsoft.schemas.office.excel.impl.CTClientDataImpl.getObjectType(CTClientDataImpl.java:14177)
        at
org.apache.poi.xssf.usermodel.XSSFVMLDrawing.matchCommentShape(XSSFVMLDrawing.java:304)
        at
org.apache.poi.xssf.usermodel.XSSFVMLDrawing.findCommentShape(XSSFVMLDrawing.java:285)
        at
org.apache.poi.xssf.model.CommentsTable.findCellComment(CommentsTable.java:198)
        at
org.apache.poi.xssf.usermodel.XSSFSheet.getCellComment(XSSFSheet.java:813)
        at
org.apache.poi.xssf.usermodel.XSSFCell.getCellComment(XSSFCell.java:1010)
        . . .

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to