Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • O openpyxl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 282
    • Issues 282
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to a massive storm of spam, registration on this instance now requires explicit administrator approval. Sorry for the added friction, we're also looking into automatic filtering options.

  • openpyxl
  • openpyxl
  • Issues
  • #1571
Closed
Open
Issue created Dec 18, 2020 by Baudouin Giard@bgbbg

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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking