Skip to content

Commit

Permalink
fix(excel): Excel Export add mime type to work in Firefox, fixes #500 (
Browse files Browse the repository at this point in the history
…#501)

Co-authored-by: Ghislain Beaulac <ghislain.beaulac@se.com>
  • Loading branch information
ghiscoding and ghiscoding-SE committed Jun 18, 2020
1 parent f03c6f9 commit 56c8e17
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export class ExcelExportService {
this._sheet.setData(finalOutput);
this._workbook.addWorksheet(this._sheet);

const excelBlob = await ExcelBuilder.Builder.createFile(this._workbook, { type: 'blob' });
const mimeType = this._fileFormat === FileType.xls ? 'application/vnd.ms-excel' : 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ';
const excelBlob = await ExcelBuilder.Builder.createFile(this._workbook, { type: 'blob', mimeType });
const downloadOptions = {
filename: `${this._excelExportOptions.filename}.${this._fileFormat}`,
format: this._fileFormat
Expand Down

0 comments on commit 56c8e17

Please sign in to comment.