feat(api)!: a cell's value type says boolean, date, time and error - #899
Merged
Conversation
`ValueType` gains the four kinds, appended so no ordinal moves, and the odf and xlsx readers report them from `office:value-type` and `c/@t`. A boolean states 1 or 0 as its number. A percentage, a currency and an xlsx date stay what they were, a string or a serial stating a number, until number formats are read. `Sheet::set_cell` writes a boolean and refuses the other three before it touches the cell. The renderer keys on `float_number` alone, so no page moves. Every binding's mirror follows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137vd79NGaB8nfLsdPoghM4
Member
Author
|
The macOS Apple slice built for both archs and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
One of the three public-API changes before the major. Independent of the other two.
The enum.
ValueTypegainsboolean,date,timeanderror, appended so no existing ordinal moves. The odf reader mapsoffice:value-typeand the xlsx readerc/@t(b,e,d) onto them, for sheet cells and odf table cells alike. A boolean states 1 or 0 as its number. A percentage, a currency and an xlsx date stay what they were, astringor afloat_numberserial stating a number, until number formats are read; the enum's doc says so.Writing.
Sheet::set_cellwrites a boolean (office:value-type="boolean"withoffice:boolean-value,t="b"with<v>1|0</v>) and refusesdate,timeanderrorwithUnsupportedOperationbefore it touches the cell, since no engine has a form for them yet.No rendering change. The renderer keys on
float_numberalone, so no page moves; the ods, xlsx, odt and docx outputs are byte-identical to the reference.Bindings. The python, Java and Objective-C mirrors gain the four values; the ordinal test pins them. The npm package exposes no
ValueType.Verified. 476 tests across the cell value, sheet, document and html suites pass, with new cases for a boolean, a date, a time and an error on both formats and for the refusals. JUnit 63 and pytest 83 pass. The touched sources are clean under Homebrew clang
-Wall -Wextra -Werror. The macOS Apple slice is building as I write this; its result follows in a comment.Changelog entry added, marked breaking.