Failing to parse formatting.

Issue #565 resolved
StephenGore
created an issue

I have recently attempted to open a worksheet and an error occurred in the content property of "Cell\Text.py". The error is "TypeError: sequence item 3: expected str instance, NoneType found". After taking a look in the sharedstrings.xml I found the error happened when parsing the following XML.

<si>
  <r>
    <t>“Replaced Data”</t>
  </r>
  <r>
    <rPr>
      <sz val="11"/>
      <color rgb="FF008080"/>
      <rFont val="Calibri"/>
      <family val="2"/>
      <scheme val="minor"/>
    </rPr>
  <t/>
  </r>
</si>

I think it is to do with the "<t/>" tag and not finding any data. More information at http://stackoverflow.com/questions/34094049/failing-to-open-spreadsheet/

Comments (3)

  1. Charlie Clark

    Thanks. If this is really extracted from an existing file then it's pretty odd because the styled text is empty. Almost worth raising an exception for!

    Is this an original Excel file? If not I suggest submitting a report on whichever library created the file.

  2. Log in to comment