LiteExcel v2.4.6
Three capability batches — worksheet/workbook protection, super tables (Table/ListObject), and icon-set conditional formatting.
What's New
1. Sheet & Workbook Protection
Worksheet.Protection(sheetProtection): lock editing per flag (select locked/unlocked cells, sort, auto filter, insert/delete rows/columns, format cells, etc.), optional password.Workbook.Protection(workbookProtection): lock structure / windows, optional password.- Passwords are written as SHA-512 + salt hashes (same mechanism as
fileSharing); no plaintext in the file.SetPassword/VerifyPassword. - xlsx/xlsm only; xls/xlsb/csv report degradation via
OnDegradation. - Verified with real Excel COM:
ProtectContents/ProtectStructureare True after opening.
2. Super Table (Table / ListObject)
ws.AddTable(ref, name, style?)/ws.RemoveTable(name)/ws.Tablesread-back.- 60 built-in Excel banded styles as the
TableStyleStyleenum (Light/Medium/Dark) plus any style-name string (CustomStyleName, takes precedence). - Per-column formats via
tbl.Column(name).NumberFormat/.Style→dataDxfId; optional header style →headerRowDxfId. - Writes
xl/tables/table{N}.xml+<tableParts>+ sheet rels + ContentTypes +styles.xmltableStyles. - Fidelity fix: opening an Excel-authored file with tables and re-saving no longer drops them (
xl/tables/*+<tableParts>are preserved). - Unknown style names and xls/xlsb/csv writes report degradation.
3. Icon-Set Conditional Formatting
ConditionalFormatType.IconSet+IconSetInfo: 17 built-in sets as theIconSetStyleenum (arrows / traffic lights / symbols / ratings / quarters) plus any set-name string.Percent/ShowValue/Thresholds; thresholds default to evenly divided by icon count (3→0/33/67, 4→0/25/50/75, 5→0/20/40/60/80);Percent=falsewritestype="num".- Reads back set name, percent/showValue flags, and thresholds; a missing
iconSetattribute falls back to the default set (Excel-compatible).
Breaking changes
- None. All existing APIs are preserved.
Notes
- 541/541 unit tests pass on net48 + net8.0.
- Verified with real Excel COM (no repair prompt) and the Native AOT gates (zero IL warnings; native executable assertions pass, including
InvariantGlobalization=true). - Full changelog: docs/CHANGELOG.md