Hi,
I'm trying to add '$' Symbol in Excel file using python. I have code the number format as :'"$"#,##0.00'(Code below).
Run the code and Download the Excel file. But When i open the excel file it shows pound symbol.
Please note: My default accounting format symbol is "£ English UK". I Need to Show the Currency symbol as $ using python. How ?
Code:
wb = Workbook()
ws0 = wb.add_sheet('Sheet 1')
currency_style = XFStyle()
currency_style.num_format_str = '"$"#,##0.00'
for i in range(1,5):
ws0.write(i, 0, 125.05, currency_style)
self.response.headers['Content-Type'] = 'application/ms-excel'
self.response.headers['Content-Transfer-Encoding'] = 'Binary'
self.response.headers['Content-disposition'] = 'attachment; filename="myfile.xls"'
wb.save(self.response.out)
Hi,
I'm trying to add '$' Symbol in Excel file using python. I have code the number format as :'"$"#,##0.00'(Code below).
Run the code and Download the Excel file. But When i open the excel file it shows pound symbol.
Please note: My default accounting format symbol is "£ English UK". I Need to Show the Currency symbol as $ using python. How ?