Skip to content

report password-protected xlsx instead of a zip error in sheets - #2093

Merged
merrick-2002 merged 2 commits into
genspark-ai:mainfrom
charan-rathore:fix/encrypted-xlsx-clear-error
Oct 20, 2026
Merged

merrick-2002 merged 2 commits into
genspark-ai:mainfrom
charan-rathore:fix/encrypted-xlsx-clear-error

Conversation

@charan-rathore

Copy link
Copy Markdown
Contributor

Summary

  • The sheets xlsx sidecar now detects the OLE2 compound-container signature before the zip reader runs, so a password-encrypted .xlsx fails with a clear "This workbook is password-protected" message instead of "invalid Zip archive: Could not find EOCD" and an empty grid
  • Encryption wraps the whole package in OLE2, so the open path always died inside ZipArchive::new with no hint about the real cause
  • New regression test builds an OLE2-magic stand-in and asserts the message

Related issue

Fixes #2076

Validation

  • npm test equivalent for the touched engine: cargo test --lib in apps/sheets/native/xlsx-engine - 262 passed, 0 failed (261 existing + the new test; the new test fails without the fix and passes with it)
  • npm run format:check - not run: Rust-only change, prettier does not cover .rs
  • npm run lint - not run: Rust-only change
  • npm run typecheck - not run: Rust-only change

Signed-off-by: Charan Rathore [email protected]

Loading
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.

sheets: password-protected .xlsx fails with "invalid Zip archive" and opens an empty grid

2 participants