Reputation: 21
I'm using Python PPTX to update a Powerpoint template with excel data, and I'm trying to format this table to include the "," after the thousands. Python over-writes any existing formatting in the table when you replace the data, and I know how to get the font, font size, position, style the way I want but I can't figure out the comma! Anyone know how to do that?
Upvotes: 1
Views: 1048
Reputation: 28893
Unlike Excel, which understands numbers and has number formats, everything in a PowerPoint table cell is a string (str in Python). So any commas or currency symbols or whatever you might want you'll need to provide yourself.
If you search on "Python format commas" you'll find plenty of resources like this other SO question/answers to help you with that. How to print number with commas as thousands separators?
Upvotes: 1