Browse Source

[FIX] type error replacing separators and credits for fixing :)

pull/2/head
ovnicraft 11 years ago
parent
commit
f4a3e65079
  1. 1
      web_export_view/AUTHORS.txt
  2. 2
      web_export_view/controllers.py

1
web_export_view/AUTHORS.txt

@ -4,3 +4,4 @@ Authors
Simone Orsi <simone.orsi@domsense.com> [simahawk]
Lorenzo Battistini <lorenzo.battistini@agilebg.com>
Stefan Rijnhart <stefan@therp.nl>
Cristian Salamea <ovnicraft@gmail.com>

2
web_export_view/controllers.py

@ -50,7 +50,7 @@ class ExcelExportView(ExcelExport):
if isinstance(cell_value, basestring):
cell_value = re.sub("\r", " ", cell_value)
if re.match(m, cell_value):
cell_value = float(cell_value.replace(separators['thousands_sep'],'')replace(separators['decimal_point'],'.'))
cell_value = float(cell_value.replace(separators['thousands_sep'],'').replace(separators['decimal_point'],'.'))
style = xlwt.easyxf(num_format_str='#,##0.00')
if cell_value is False: cell_value = None
worksheet.write(row_index + 1, cell_index, cell_value, style)

Loading…
Cancel
Save