Skip to content

docs: correct global converter write examples - #1091

Open
skytin1004 wants to merge 1 commit into
apache:mainfrom
skytin1004:docs/global-converter-registration
Open

docs: correct global converter write examples#1091
skytin1004 wants to merge 1 commit 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.

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.

1 participant