Skip to content

Commit 8c8fa61

Browse files
adding symbol to force utf-8 casting in Excel (#790)
Co-authored-by: Alfred Rubin <[email protected]>
1 parent 5a4d1d9 commit 8c8fa61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chart/ChartUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export const downloadCSV = (rows) => {
172172
});
173173
csv += '\n';
174174
});
175-
const file = new Blob([csv], { type: 'text/plain;charset=utf8' });
175+
const file = new Blob([`\ufeff${ csv}`], { type: 'text/plain;charset=utf8' });
176176
element.href = URL.createObjectURL(file);
177177
element.download = 'table.csv';
178178
document.body.appendChild(element); // Required for this to work in FireFox

0 commit comments

Comments
 (0)