LiteExcel v2.4.0
File-level security (open password / modify password) + rich report export (hyperlinks / freeze panes / images).
🆕 Added
File-Level Security (full round-trip for xlsx / xlsm / xlsb)
- Open-password reading: Supports Agile Encryption (AES-256-CBC / SHA-512 / spinCount=100000) workbooks.
Excel.Open(path, new ExcelReadOptions { OpenPassword = "..." }) - Open-password saving: Passwords are inherited by default on
SaveAs; explicitly set viawb.Security.SetOpenPassword("...") - Modify-password detection: Recognizes
<fileSharing>write protection;Workbook.Security.HasModifyPasswordreports the state; providingModifyPasswordgrants edit/save permission - Modify-password save / remove:
SetModifyPassword/RemoveModifyPassword/ClearAll - Security state:
Workbook.Security→HasOpenPassword/HasModifyPassword/HasModifyAccess/IsReadOnly/CanSave/ReadOnlyRecommended - Passwords never appear in exceptions / logs / test output
Hyperlinks (xlsx / xlsm / xlsb / xls)
Cell.Hyperlink(Target/Tooltip/IsInternal)- External URL / file / mailto / UNC links and intra-workbook jumps supported
Freeze Panes (xlsx / xlsm / xlsb / xls)
Worksheet.FreezeRows/FreezeColumns— freeze any number of rows/columnsFreezeHeaderretained as a convenience alias forFreezeRows=1
Image Write-Back (xlsx / xlsm)
- Floating images:
ws.AddImage(data, row, col, widthPx, heightPx, ImagePlacement.Floating) - InCell images:
ws.AddImage(data, row, col, ImagePlacement.InCell)(richData pipeline) - Automatic extension (PNG/JPEG/GIF/BMP) and pixel-size detection; multi-sheet / multi-image / mixed modes
- Adding an image to a workbook that already contains images merges into the existing drawing — no zip name collisions
🛠 Fixed
- xlsb modify-password read/write round-trip (
BrtFileSharingIso) - Read-only bypass: setting/modifying passwords without modify permission now throws
- Internal-hyperlink OOXML correction (
locationinstead of external rel; fixes mailto/file/UNC misclassification) - Decryption correctness: verifier hash truncated by
hashSize, decrypted payload truncated bydataSize,dataIntegrityHMAC validation - Passing
OpenPasswordfor a non-encrypted file now throws a clear exception AddImageon an existing image workbook → media numbering preserved + drawing mergedCell.CopyFromdeep-copies hyperlinks
📝 Changed
Worksheet.FreezeHeadersemantics: now an alias forFreezeRows = 1(still backfilled whenySplit=1on read — backwards compatible)
⚠️ Compatibility Notes
- No breaking changes (all additions are incremental properties/overloads)
- Images are write-only (opening a file does not populate
Images); image reading is out of scope for 2.4.0 - xls/xlsb images and legacy xls passwords (RC4 XOR) are not in this release's scope
- Full test suite: 423 tests passing, clean builds on net48 + net8.0