davidgohel / flextable

table farming
https://ardata-fr.github.io/flextable-book/
554 stars 79 forks source link

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

Closed terashim closed 11 months ago

terashim commented 11 months ago

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 commented 11 months ago

Thank you @terashim for your PR :)