Skip to content

fix(xlsx): preserve entered float digits by setting float_format=str (#2532) - #2656

Open
İlker Oğulcan SAYIN (iosayin) wants to merge 4 commits into
microsoft:mainfrom
iosayin:fix/2532-xlsx-float-format
Open

İlker Oğulcan SAYIN (iosayin) wants to merge 4 commits into
microsoft:mainfrom
iosayin:fix/2532-xlsx-float-format

Conversation

@iosayin

Copy link
Copy Markdown

Closes #2532

Summary of Changes

  • Passes float_format=str to DataFrame.to_html() in both XlsxConverter and XlsConverter.
  • Prevents pandas' default 6-digit scientific notation from mangling raw float cell values (e.g., losing fractional digits on large numbers or converting 0.1 to 1.000000e-01).
  • Adds regression unit test verifying that precise float values like 123456789.123 and 0.1 round-trip without scientific notation truncation.

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.

XLSX/XLS: float values rendered in 6-digit scientific notation, entered digits are dropped

1 participant