export const downloadExcel = async (excel, filename) => {
    const data = (await excel.getBuffer()).toString('base64');
    const bufferData = Buffer.from(data, 'base64');
    const blob = new Blob([bufferData], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
    const url = window.URL.createObjectURL(blob);
    const a = document.createElement('a');
    a.href = url;
    a.download = `${filename}.xlsx`;
    document.body.appendChild(a);
    a.click();
    a.remove();
};
//# sourceMappingURL=func.js.map