Skip to content

Fix ODS row removal and replacement to match XLS/XLSX - #111

Draft
bact wants to merge 7 commits into
spdx:masterfrom
bact:fix-ods-row-removal
Draft

bact wants to merge 7 commits into
spdx:masterfrom
bact:fix-ods-row-removal

Conversation

@bact

@bact bact commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Note

Based on changes in PR #110. Don't review until PR #110 get merged.

PR #110 made ODS row and cell bounds count style, formula and comment, not just value. clear, removeCell and createRow only cleared values, so removed rows and cells could still be found.

What this PR changes:

  • clear and removeCell clear value, formula, comment and style
  • removeRow recomputes the cached row bounds, so getRow and getLastRowNum ignore a removed first or last row
  • createRow on an existing row replaces it: no cells, default height, visible
  • removeRow resets height and visibility the same way

getRow still returns an empty row between data rows (POI returns null). ODS can't tell a missing row from an empty one.

- `OdsSheet` and `OdsRow` now report row and cell bounds like POI, ignoring empty rows before and after the data (fixes phantom snippets with no ID)
- Add LibreOffice-generated ODS fixtures and a generator script
- Add parity tests against XLS/XLSX

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
- removeRow: getRow/getLastRowNum ignore the removed row
- clear/removeCell clear value, formula, comment, style
- createRow replaces an existing row
- Need spdx#110 to merge first

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the bug Something isn't working label Sep 19, 2026
@bact
bact marked this pull request as draft September 19, 2026 10:19
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant