Openpyxl setting number format

后端 未结 3 869
暖寄归人
暖寄归人 2020-12-15 03:31

Could please someone show an example of applying the number format to the cell. For example, I need scientific format, form would be like \'2.45E+05\' but I couldn\'t figure

3条回答
  •  天涯浪人
    2020-12-15 04:22

    Note: this answer worked with earlier versions of openpyxl, but does not work with openpyxl 2.0

    This is how to do it:

        _cell.style.number_format.format_code = '0.00E+00' 
    

提交回复
热议问题