|
626 | 626 | var exportData = self.getData(grid, rowTypes, colTypes);
|
627 | 627 | var csvContent = self.formatAsCsv(exportColumnHeaders, exportData, grid.options.exporterCsvColumnSeparator);
|
628 | 628 |
|
629 |
| - self.downloadFile (grid.options.exporterCsvFilename, csvContent, grid.options.exporterOlderExcelCompatibility); |
| 629 | + self.downloadFile (grid.options.exporterCsvFilename, csvContent, grid.options.exporterCsvColumnSeparator, grid.options.exporterOlderExcelCompatibility); |
630 | 630 | });
|
631 | 631 | },
|
632 | 632 |
|
|
909 | 909 | * download as a file
|
910 | 910 | * @param {boolean} exporterOlderExcelCompatibility whether or not we put a utf-16 BOM on the from (\uFEFF)
|
911 | 911 | */
|
912 |
| - downloadFile: function (fileName, csvContent, exporterOlderExcelCompatibility) { |
| 912 | + downloadFile: function (fileName, csvContent, columnSeparator, exporterOlderExcelCompatibility) { |
913 | 913 | var D = document;
|
914 | 914 | var a = D.createElement('a');
|
915 | 915 | var strMimeType = 'application/octet-stream;charset=utf-8';
|
|
921 | 921 | var frame = D.createElement('iframe');
|
922 | 922 | document.body.appendChild(frame);
|
923 | 923 |
|
924 |
| - frame.contentWindow.document.open("text/html", "replace"); |
925 |
| - frame.contentWindow.document.write('sep=,\r\n' + csvContent); |
| 924 | + frame.contentWindow.document.open('text/html', 'replace'); |
| 925 | + frame.contentWindow.document.write('sep=,' + columnSeparator + '\r\n' + csvContent); |
926 | 926 | frame.contentWindow.document.close();
|
927 | 927 | frame.contentWindow.focus();
|
928 | 928 | frame.contentWindow.document.execCommand('SaveAs', true, fileName);
|
|
0 commit comments