@@ -154,6 +154,9 @@ function writeWorkbook(workbook, baseName, ext, opt = {}) {
154
154
* and https://github.com/SheetJS/sheetjs
155
155
* Solution at bottom of: https://github.com/SheetJS/sheetjs/issues/943
156
156
* The "Comma Separated Values" format is actually UTF-8 with BOM prefix.
157
+ * A “U+” designation refers to a character, and in this case that would be
158
+ * U+FEFF; the start of the file is the three-byte sequence EF BB BF which is
159
+ * how U+FEFF is represented in UTF-8.
157
160
* @param {Workbook } workbook workboox to download.
158
161
* @param {String } baseName Basename of downloaded file.
159
162
* @param {String } ext Extension of downloaded file.
@@ -224,8 +227,8 @@ export function exportWorkbook(workbook, baseName, ext) {
224
227
* available, and resulting file is UTF-8 +BOM anyways.
225
228
*/
226
229
case 'tsv' : // UTF-8 BOM version
227
- // SheetJS note: For compatibility with Excel, csv output will always
228
- // include the UTF-8 byte order mark ("BOM").
230
+ // SheetJS note: For compatibility with Excel, writeFile() csv output
231
+ // will always include the UTF-8 byte order mark ("BOM").
229
232
//writeFile(workbook, fileName, {bookType: 'csv', FS: '\t'});
230
233
data = XlsxUtils . sheet_to_csv ( worksheet , { FS : '\t' } ) ;
231
234
//data = '\uFEFF' + data; //BOM
0 commit comments