apache/cordova

XLSX.writeFile is not working in angular to cordova app

Closed this issue · 1 comments

Here is my code which i have implemented in Angular project

fileName = 'RequestReportExcelSheet.xlsx';
exportexcel(): void {
/* table id is passed over here /
let element = document.getElementById('reportTable');
const ws: XLSX.WorkSheet = XLSX.utils.table_to_sheet(element);
ws['!cols'] = [];
ws['!cols'][5] = { hidden: true };
/
generate workbook and add the worksheet /
const wb: XLSX.WorkBook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
//console.log(wb);
/
save to file */
XLSX.writeFile(wb, this.fileName);
}

Also I have added the 'cordova plugin add cordova-plugin-file' this plugin but not able to download the xlsx file

Please open a new issue in the correct repo and fill in the issue template! Thanks.