Skip to content

Fix XLSX save after deleting formatted columns - #516

Closed
freddy-bio wants to merge 1 commit into
logisky:mainfrom
freddy-bio:codex/fix-column-export
Closed

freddy-bio wants to merge 1 commit into
logisky:mainfrom
freddy-bio:codex/fix-column-export

Conversation

@freddy-bio

Copy link
Copy Markdown

Deleting a column with a custom width leaves its stable column ID in ColInfoManager. XLSX save then calls fetch_col_idx(...).unwrap() for that deleted ID and panics with ColIndexUnavailable, so an otherwise valid workbook cannot be exported.

Remove the deleted column's formatting when DeleteCols runs, and skip orphaned column metadata in the XLSX writer so already-affected in-memory workbooks can also save. A regression test covers save/reload after deletion and saving after undo/redo.

Validation: cargo test -p logisheets_controller --lib (473 passed); cargo fmt --all -- --check.

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

@freddy-bio is attempting to deploy a commit to the JeremyHe's projects Team on Vercel.

A member of the Team first needs to authorize it.

@freddy-bio freddy-bio closed this Sep 24, 2026
@freddy-bio
freddy-bio deleted the codex/fix-column-export branch September 24, 2026 14:57
@ImJeremyHe

Copy link
Copy Markdown
Member

@freddy-bio Thanks for your contribution. May I ask why this PR is closed?

@freddy-bio

Copy link
Copy Markdown
Author

hey, thanks to you.

I apologise, Codex did this automatically, and I didn't test it as didn't have time, so I proceeded to close it. Sorry about this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants