Skip to content

docs: correct global converter write examples - #1091

Merged
delei merged 2 commits into
apache:mainfrom
skytin1004:docs/global-converter-registration
Oct 8, 2026
Merged

delei merged 2 commits into
apache:mainfrom
skytin1004:docs/global-converter-registration

Conversation

@skytin1004

Copy link
Copy Markdown
Contributor

Purpose of the pull request

The global XLSX/XLS write examples register a converter with a STRING key, but ordinary Excel writes look it up with a null Excel type key. As a result, the custom transformation is skipped. This PR corrects the examples to match that lookup.

Related: #889

What's changed?

  • Use a null Excel type key for global XLSX/XLS writing in the English and Chinese examples; retain STRING for CSV writing and reading string cells.
  • Clarify that registered converters must match the lookup key, and the returned WriteCellData determines the output cell type.
  • Add XLSX/XLS tests that check the written values and field-level converter precedence.

Validation: both XLSX/XLS regression cases fail with the original registration and pass with the corrected key. All 9 CustomConverterTest cases pass on JDK 11, and the fork PR's Java and documentation CI checks pass.

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

The Chinese documentation updates were translated with AI. A review of the Chinese wording would be appreciated.

@delei delei left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@delei
delei merged commit 08d13a6 into apache:main Oct 8, 2026
11 checks passed
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.

2 participants