fix(xlsx): exclude phonetic guide text from cell values - #348
Merged
Conversation
goworm
added a commit
that referenced
this pull request
Sep 7, 2026
… just one #348 removed the <rPh> furigana from the shared-string reader, but the same CT_Rst.InnerText call sat in three more places, so a Japanese cell still read back as "項目コウモク" through them: - the inline-string branch of GetCellDisplayValue (get / view text / view html) - ResolveCellRawText, which populates chart caches from either string form - the rich-text conversion in AddRun, which folded the guide into the run it preserves when turning a plain cell into runs — corrupting stored content Both SDK string types derive from RstType, so the rule now lives in one helper, RstTextWithoutPhonetic, used by all four readers: take the direct <t>, else concatenate the <r><t> runs, never InnerText. Multi-run rich text is unaffected and the guide is still surfaced separately as Format["phonetic"].
Contributor
|
Merged — thanks, the diagnosis and the approach were both right (reading the direct One note for completeness: the same
Since |
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
<rPh>phonetic-guide text from ordinary XLSX cell display valuesformat.phoneticreadbackFixes #343
Validation
Using the reporter's attached
sample.xlsx:I also created a shared-string cell with two formatted runs (
Hellobold,worlditalic).view textstill returnsHello world,view htmlretains both formatted spans, andofficecli validatepasses.Project build:
dotnet build src/officecli/officecli.csproj -c Release --no-restore # Build succeeded (one pre-existing CS8602 warning in ExcelHandler.SheetShift.cs).