Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
O
openpyxl
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 181
    • Issues 181
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • openpyxl
  • openpyxl
  • Issues
  • #1571

Closed
Open
Opened Dec 18, 2020 by Baudouin Giard@bgbbgContributor

Rows containing cells skipping reference attribute are incorrectly parsed

Some Excel files generated with third-party libraries such as SpreadsheetGear - there could be other, skip the "r" attribute on "c" tags within rows. Excel seems to put this attribute on every cell, but I couldn't find any evidence that the standard commands it.

openpyxl is not expecting these attributes to be skipped, so the result is that we end up with an invalid parsed row.

Impacted rows look like this:

<row xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    <c>
        <v>1</v>
    </c>
    <c r="D1">
        <v>2</v>
    </c>
    <c>
        <v>3</v>
    </c>
    <c r="G1">
        <v>4</v>
    </c>
</row>

Expected

  • Cell B1 has no value
  • Cell E1 has value 3

Actual

  • Cell B1 has value 3
  • Cell E1 has no value

I have a fix in hand, and will try to submit a pull-request referencing this issue.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: openpyxl/openpyxl#1571