12

I'm creating an excel sheet using openpyxl. Some cells represent monetary values. How can I change the format of a cell to be of type "currency", i.e. I want a "€" symbol to be displayed after the number.

Dominic
  • 383
  • 1
  • 3
  • 16
  • why not save it as unicode string? – Vaulstein Jan 07 '16 at 10:10
  • actually, this was the workaround I'm using at the moment. However, I feel it is cleaner to add the semantic information to the cell, that I could still use it for calculation in excel if needed. – Dominic Jan 07 '16 at 10:20

1 Answers1

24

Try setting the format code with your desired format code

_cell.number_format = '#,##0.00€' 
Community
  • 1
  • 1
absolutelyNoWarranty
  • 1,888
  • 2
  • 17
  • 17