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

This commit is contained in:
ovnicraft
2013-08-17 15:11:24 -05:00
parent 1a78c9f7ec
commit f4a3e65079
2 changed files with 2 additions and 1 deletions

View File

@@ -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>

View File

@@ -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)