-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
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-01Root 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 numberAction Items
- Add note to CLI help for
viewcommand explaining General format behavior - Add example in
docs/reference/cli.mdshowing how to preserve decimal display - Consider adding a
--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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation