Skip to content

Add support for deleting rows (with upward shift) while preserving existing styles #291

Closed

Description

@abcdvvvv

I am using XLSX.jl to do partial read-write, I need to delete some rows and make the remaining rows move up (similar to the Excel interface operation: Delete → Entire row), and at the same time want to retain the original cell style, color, bold, merge cells and other information.

Currently, XLSX.jl does not provide such an API. If we do batch processing with code, then we can only read the last line in plain text and fill it with the deleted blank lines. But the style cannot be preserved.

Thank you.

Activity

  1. TimG1964 commented on Apr 3, 2025

    @TimG1964
    Collaborator

    Deleting a row would mean checking all formulas, definedNames, etc, and re-referencing them, wouldn't it? This seems like a rather big job!
    I had a use case for inserting rows, but gave it up for this reason.
    To add or delete rows while ignoring the consequences (for formulas, etc), wouldn't be too hard, though, just a bit risky!

    PR #290 should provide much more convenient ways to manage cell formats (but not to merge cells).

  2. abcdvvvv commented on Apr 3, 2025

    @abcdvvvv
    Author

    Thank you for your response!
    It is indeed a very difficult job, and I'm sorry that the request I made was really inappropriate.

    Thank you!

  3. TimG1964 commented on Nov 14, 2026

    @TimG1964
    Collaborator

    I previously suggested that this was too hard.

    I was wrong!

    The new release, v0.13.4, now implements insert/delete for both rows and columns and correctly handles all the complexities I pointed out previously.

  4. abcdvvvv commented on Nov 15, 2026

    @abcdvvvv
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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