Skip to content

LiteExcel v2.4.6

Choose a tag to compare

@JackZ695 JackZ695 released this 25 Aug 05:50
· 68 commits to main since this release

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 / ProtectStructure are True after opening.

2. Super Table (Table / ListObject)

  • ws.AddTable(ref, name, style?) / ws.RemoveTable(name) / ws.Tables read-back.
  • 60 built-in Excel banded styles as the TableStyleStyle enum (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.xml tableStyles.
  • 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 the IconSetStyle enum (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=false writes type="num".
  • Reads back set name, percent/showValue flags, and thresholds; a missing iconSet attribute 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