Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openpyxl
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 264
    • Issues 264
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • 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
  • openpyxl
  • openpyxl
  • Merge requests
  • !261

Fix for missing borders.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Bitbucket Importer requested to merge bitbucket/merged-pr-261 into branch/2.6 May 30, 2018
  • Overview 35
  • Commits 12
  • Pipelines 0
  • Changes 10

Created originally on Bitbucket by mschieder (Magnus Schieder)

Was already merged in Bitbucket before import, marked as merged by the import user

See https://bitbucket.org/openpyxl/openpyxl/issues/988/merge-cells-loosing-style-information

When dealing with merged Cells, Excel and Libreoffice create phantom cells to keep border information for merged cells. This is unwanted behaviour. Openpyxl eleminates those phantom cells.

Excel and Libreoffice receive the fills and the positioning from the upper left cell of the merged cell.

MergedCellRange stores the border information of a merged cell in the top left cell of the merged cell. For this the upper left cell gets the border information of the bottom and right border from the bottom right cell of the merged cell, if available. The remaining cells in the merged cell are stored as MergedCell objects. The MergedCells at the edge of the merged cell gets its borders from the upper left cell.

- The top MergedCells get the top border from the top left cell.
- The bottom MergedCells get the bottom border from the top left cell.
- The left MergedCells get the left border from the top left cell.
- The right MergedCells get the right border from the top left cell.

When formatting the top left cell of the merged cell, the complete merged cell is formatted.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bitbucket/merged-pr-261