I am using sheetjs https://github.com/SheetJS/sheetjs for reading xlsx file and converting it into html for preview. For big excel files the browser get busy and consume lots of memory. Is there any way to overcome this issue, I am thinking to apply pagination.
Angular Component:
createHtmlTable(workBook: WorkBook) {
this.sheetName = workBook.SheetNames[0];
let generatedTableHtml: any = XLSX.utils.sheet_to_html(workBook.Sheets[workBook.SheetNames[0]],
{ id: 'DataTableDiv'/*, editable: true, */});
generatedTableHtml = generatedTableHtml.replace('<table',
'<table mat-table border="1"')
.replaceAll('<tr>', '<tr><td></td>');
const tableElement = document.getElementById('DataTableDiv');
tableElement.innerHTML = generatedTableHtml;
}
HTML:
<div id="DataTableDiv"></div>
question from:
https://stackoverflow.com/questions/65623469/how-to-add-pagination-in-sheetjs-sheet-to-html 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…