Summary
Users are surprised when long decimal numbers display in scientific notation. This is expected Excel behavior, not a bug, but needs documentation.
Severity: Low | Effort: Trivial
Current Behavior
xl -f in.xlsx view A1
# A1 contains: 0.123456789012
# Output: 1.234568E-01
Root Cause (Not a Bug)
NumFmtFormatter.formatGeneral() intentionally switches to scientific notation when string length > 11 characters:
// NumFmtFormatter.scala lines 127-133
if str.length > 11 then f"${n.toDouble}%.6E"
This matches Excel's General format behavior and is independent of column width.
Workaround
Users should apply explicit NumFmt for financial precision:
xl -f in.xlsx -o out.xlsx style A1 --num-fmt number
Action Items
Key Files
xl-core/src/com/tjclp/xl/display/NumFmtFormatter.scala (lines 127-133)
docs/reference/cli.md
Summary
Users are surprised when long decimal numbers display in scientific notation. This is expected Excel behavior, not a bug, but needs documentation.
Severity: Low | Effort: Trivial
Current Behavior
Root Cause (Not a Bug)
NumFmtFormatter.formatGeneral()intentionally switches to scientific notation when string length > 11 characters:This matches Excel's General format behavior and is independent of column width.
Workaround
Users should apply explicit
NumFmtfor financial precision:Action Items
viewcommand explaining General format behaviordocs/reference/cli.mdshowing how to preserve decimal display--format precisionoption for view command (separate enhancement)Key Files
xl-core/src/com/tjclp/xl/display/NumFmtFormatter.scala(lines 127-133)docs/reference/cli.md