Skip to content

Commit 9874361

Browse files
authored
Merge pull request #2060 from kyoshidajp/fix_export_excel
Fix error when exporting list data as Excel file
2 parents b28c8fa + 95c707d commit 9874361

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redash/models.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,10 @@ def make_excel_content(self):
738738

739739
for (r, row) in enumerate(query_data['rows']):
740740
for (c, name) in enumerate(column_names):
741-
sheet.write(r + 1, c, row.get(name))
741+
v = row.get(name)
742+
if isinstance(v, list):
743+
v = str(v).encode('utf-8')
744+
sheet.write(r + 1, c, v)
742745

743746
book.close()
744747

0 commit comments

Comments
 (0)