Skip to content

fix: ph_with.flextable() formats widths and heights correctly #576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

terashim
Copy link
Contributor

@terashim terashim commented Oct 5, 2023

When I set the column widths of a flextable to 2.5 cm and save it as a PowerPoint file using ph_with.flextable(),
the pptx file was corrupted.
The function converted 2.5 cm to 900,000 EMUs of OOXML, and the number was formatted in scientific notation as 9e+5. This was the cause of the corruption.
So, I fixed the function to avoid scientific notation and format the number as 900000.

@davidgohel
Copy link
Owner

Thank you @terashim for your PR :)

@davidgohel davidgohel merged commit 26721c7 into davidgohel:master Oct 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants