Skip to content
This repository was archived by the owner on May 26, 2022. It is now read-only.
This repository was archived by the owner on May 26, 2022. It is now read-only.

Propose of the way of cell merging in Writer #529

@vlad-khramov

Description

@vlad-khramov

We can add list of ranges for merging cells to classes based on WorksheetInterface in this way
ranges = [Range(), Range()]
where Range - class with 4 ints: x, y of top left cell and x, y of bottom right cell

Then we can handle it in such way:

  • XLSX - add section <mergeCells><mergeCell ref="A1:A2"/></mergeCells> in sheet
  • ODS - modify addRow to check this ranges,
    • if cell is the first cell of range - add attributes table:number-columns-spanned="2" table:number-rows-spanned="2"
    • if cell in the first row of range - skip
    • if cell in another rows - add element <table:covered-table-cell table:number-columns-repeated="2"/> insted of all cells in this row from this range
  • CSV - throw exception Unsupported

We can make pull request, if you approve this idea. Also we will be glad to see any additional ideas and comments

related to #303 #350

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions