Skip to content

Commit 2b2403f

Browse files
committed
fix download_sheet
XLSX.write produces an ArrayBuffer. The Blob constructor takes an array of ArrayBuffers, not a single ArrayBuffer.
1 parent aea5db4 commit 2b2403f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ Numbas.addExtension('sheets', ['display', 'util', 'jme','sheet-element', 'xlsx']
466466

467467
var wbout = XLSX.write(wb, { type: 'array', bookType: 'xlsx' });
468468

469-
const blob = new Blob(wbout, { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
469+
const blob = new Blob([wbout], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
470470
const url = URL.createObjectURL(blob);
471471

472472
const link = document.createElement('a');

0 commit comments

Comments
 (0)