fix: preserve numeric-looking inline strings#342
Merged
MathNya merged 2 commits intoJul 22, 2026
Conversation
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
developer0hye
marked this pull request as ready for review
July 18, 2026 15:07
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com> (cherry picked from commit 6e968e3)
Contributor
|
I legit had this problem this morning. Thanks. I had some text with leading zeros and my zeros got removed. |
Contributor
Author
|
@c-git cool |
Owner
|
@developer0hye |
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.
Summary
inlineStrcell values as strings instead of guessing their type.formatted_value()instead of applying numeric number-format coercion.0050) through both raw and formatted value APIs.Root cause
The XLSX reader routed
inlineStrtext throughset_value_crate, which guesses scalar types. That converted values such as0050to the number50, losing both the leading zeros and the source cell type. After preserving the raw string type,formatted_value()still passed the text through the number formatter, which again normalized it to50under the General format.The reader now uses the existing
set_value_string_cratepath, and formatted text values bypass numeric formatting just as Excel text cells do.Impact
Numeric-looking text stored as OOXML inline or shared strings now remains text through both value APIs. Numeric cells continue to use their number formats.
Validation
cargo test(86 library tests, 112 integration tests, 4 streaming-writer tests, and 79 doc tests passed; 23 tests ignored)cargo clippy --lib -- -D warningscargo +nightly fmt --all -- --check