Creates the .xlsx file as a Blob (compressed), e.g. to upload it instead of downloading it.
const blob = await new ExcelService().createExcelBlob([["Name", "City"], ["Ann", "Berlin"]]);
await fetch("/api/upload", { method: "POST", body: blob });
ZIP without compression (method 0, synchronous). Kept for compatibility – downloads use createZipCompressed.
Downloads a matrix data as an Excel file.
A 2D array representing the data to be included in the Excel file. Each inner array corresponds to a row in the sheet.
Optional filename: string = 'file.xlsx'The name of the Excel file to be downloaded. Defaults to 'file.xlsx'.
Optional author: string = ''The author's name to include as metadata in the Excel file. Optional parameter.
Does not return a value.
Throws an error if the input matrix is not a valid 2D array or if the filename is an empty string.
Writes real
.xlsxfiles (Office Open XML) without any library – compressed with the browser's built-inCompressionStream. Numbers stay numbers, everything else becomes text.TableApi.downloadExcel exports what the table shows; use the ExcelService directly for any other data.
Example
Example
See
Training: Excel export without a library