# UnifiedSpread dev-20.6.1 Cell Formatting / XLSX Foundation

## Scope

dev-20.6.1 strengthens the NativeGrid spreadsheet UX before moving to charts/images/pivot work.

## Implemented

- Cell formatting model foundation
  - Bold / italic / underline toggle
  - Text color / fill color
  - Horizontal alignment
  - Wrap text
  - Border flag
  - Number format metadata
  - Font size metadata
- Toolbar state reflection
  - Selection style is read from the model and reflected on toolbar buttons.
  - Mixed values are treated as neutral state.
- Sheet operation improvements
  - Duplicate active sheet.
  - Delete active sheet with last-sheet guard.
  - Move active sheet left/right.
  - Inline sheet tab rename instead of browser prompt.
  - Sheet tab context menu.
- Row/column selection via headers
  - Clicking row headers selects the row.
  - Clicking column headers selects the column.
- Formula foundation
  - On-demand dependency recalculation when referenced cells change.
  - Simple cycle detection returning `#CYCLE!`.
  - Formula copy/paste adjusts relative A1 references while preserving `$` absolute axes.
- XLSX round-trip foundation
  - Import: merges, row heights, column widths, basic SheetJS style metadata.
  - Export: merges, row heights, column widths, basic style metadata, number format metadata.

## Notes

SheetJS Community Edition has limited style preservation during write. dev-20.6.1 still writes style objects to the worksheet using standard SheetJS fields so a future style-capable writer or a dedicated `XlsxImportEngine` can reuse the same mapping.

## Commenting policy

The added code comments explain design intent for model-owned style persistence, formula safety, relative reference shifting, and XLSX style mapping. Comments avoid restating obvious implementation lines.
