Skip to content

Commit

Permalink
fix encoding issue in excel document creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmog committed Feb 25, 2016
1 parent be18ed6 commit c86a891
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Products/PloneFormGen/content/saveDataAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,9 @@ def download_xls(self, REQUEST=None, RESPONSE=None):

for row in self.getSavedFormInput():
for col_num, col in enumerate(row):
sheet.write(row_num, col_num, col.encode(self.getCharset()))
if type(col) is unicode:
col = col.encode(self.getCharset())
sheet.write(row_num, col_num, col)
row_num += 1

string_buffer = StringIO()
Expand Down

0 comments on commit c86a891

Please sign in to comment.