Skip to content

Read an error code held in a cell as the error itself (#226) - #233

Merged
SuruchBoss merged 3 commits into
mainfrom
claude/new-session-m6mehm
Oct 5, 2026
Merged

SuruchBoss merged 3 commits into
mainfrom
claude/new-session-m6mehm

Conversation

@SuruchBoss

@SuruchBoss SuruchBoss commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Closes #226. Next in the sprint-final queue: #226 → #232 → #51 → #219 → #59.

The bug: a cell holding #N/A, #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM! or #NULL! as a value was text, because cellLiteral.ts had no rule for error codes. Formulas that read it went quietly wrong. =SUM(A1:A3) over 100, a typed #DIV/0! and 80 gave 180, and =IFERROR(A2,0) let the text through. Since #227 this also covered every constant error cell in an opened file, and since #222 the codes a pivot writes for a group's error.

The fix:

Reproduced on main first

main 004a09d this PR Excel
100, #DIV/0! (typed), 80 → =SUM(A1:A3) 180 #DIV/0! #DIV/0!
=IFERROR(A2,0) #DIV/0! (the text) 0 0
=IFNA(A4,"none") over a typed #N/A #N/A (the text) none none
Opened file: t="e" A1, A2, 5, =SUM(A1:A3) A4 reads 5 A4 reads #DIV/0! #DIV/0!
=SUM('สรุป'!B2:B3) over a pivot's error cell 80 #DIV/0! #DIV/0!
'#N/A, #N/A please, #1, a file's text cell #N/A text text text

Checked in real Excel by the owner (typed into Excel desktop, 2026-10-05). The rest of the Excel column is what #226 itself states.

  • A typed #n/a in lower case becomes the #N/A error. The formula bar shows #N/A and the cell is centred as an error. This PR now matches it: the seven codes are read in any case and spelled back as Excel spells them, so #n/a also goes out to the file as #N/A.
  • A typed #SPILL! stays text (left-aligned). This PR keeps the newer codes as text, now with a test.

The owner also tried ISERROR/ISTEXT in the app: on main they read #NAME?, which is the missing IS… family below.

How it was verified

  • npm run verify (all ten gates): all ten gates green on 1f6644c (the current head)
Gate Result
lint · check:readme · check:screens pass
check:deps every advisory fixed or accounted for
test 1996 passed (1985 by the README's static count)
check:mutants 32/32 killed
build · check:bundle 3799/4200 KB, largest chunk 934/1300 KB
check:a11y 121 checks passed
check:e2e 58 flows passed

For PO

The branch

This is the session's branch claude/new-session-m6mehm. The work was written on a local branch from main 004a09d.

🤖 Generated with Claude Code

https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj

A cell holding #N/A, #DIV/0!, #VALUE!, #REF!, #NAME?, #NUM! or #NULL! as a
value was text, so SUM stepped over it to a clean-looking total and
IFERROR let it through. literalValue now reads the exact code as the error,
which covers every way in at once: typing, pasting, opening a file's
t="e" cells, and the codes a pivot writes for a group's error.

A leading apostrophe, the Text format, and text that only starts with #
stay text, and a file's string cell reading "#N/A" keeps its apostrophe on
import, as before. Export now takes the error from literalValue instead of
a second list of codes.

Constant error cells leave the open report (#227): the app keeps them
whole now, so nothing about them is lost.

Recount to 1984 tests in 141 files; retake picture 27 and the social card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
excel-to-go Ready Ready Preview Oct 5, 2026 2:12am UTC

claude added 2 commits October 5, 2026 01:53
Checked in real Excel: a typed #n/a becomes the #N/A error, while a typed
#SPILL! stays text. errorLiteral now matches the seven codes ignoring
case and returns the error as Excel spells it, so #n/a also goes out to
the file as #N/A. The newer codes stay text, now with a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj
@SuruchBoss
SuruchBoss merged commit 3b56a3d into main Oct 5, 2026
18 checks passed

Copy link
Copy Markdown
Owner Author

PO review — merged at 1f6644c (main 3b56a3d).

Verify (local, full): green — 1996 tests, mutants 32/32, a11y 121, e2e 58. CI 17/17 green on the same head.

Tried as a user on a production build:

  • 1280, typed: #DIV/0! and #n/a show as #DIV/0! / #N/A in red; '#N/A, #SPILL! and #1 stay text in black. SUM(A1:A3) → #DIV/0!, IFERROR(A2,0) → 0, IFNA(A4,"none") → none, IFNA over the apostrophe text passes it through, SUM over the text cells → 0, COUNTA 7, COUNT 2. Undo, then typing after it, fine.
  • Export: typed #n/a → {error:"#N/A"}, '#N/A and #SPILL! → text.
  • A file with constant error cells and a string cell reading #N/A: SUM over the errors → #DIV/0! (it read 5 before), the string stays text (SUM → 3), and the "cannot keep" report no longer lists error values, since nothing is lost now.
  • 390 touch: typed #div/0! → #DIV/0!. No page errors, no alerts anywhere.

These match what the owner checked in Microsoft Excel this morning (lower case is the error, #SPILL! is text).

One cosmetic difference, not blocking: the formula bar on a cell typed as #n/a still shows #n/a; Excel rewrites it to #N/A. The value is right everywhere it is read; left for after the pause.

Hold set left: #232 → #51 → #219 → #59.


Generated by Claude Code

This branch was successfully deployed

1 active deployment
Preview — 1f6644cf Deployed Oct 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An error code typed, pasted or imported into a cell stays text, so formulas that read it go silently wrong

2 participants