将 openpyxl 单元格格式设置为货币

Set openpyxl cell format to currency

我正在使用 openpyxl 创建 excel sheet。一些单元格代表货币价值。如何将单元格的格式更改为 "currency" 类型,即我希望在数字后显示一个“€”符号。

尝试setting the format code with your desired format code

_cell.number_format = '#,##0.00€'