You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
416 B
13 lines
416 B
export function download(filename, data) {
|
|
const downloadLink = window.document.createElement("a");
|
|
downloadLink.href = window.URL.createObjectURL(
|
|
new Blob([data], {
|
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
})
|
|
);
|
|
downloadLink.download = filename;
|
|
document.body.appendChild(downloadLink);
|
|
downloadLink.click();
|
|
document.body.removeChild(downloadLink);
|
|
}
|