<script lang="javascript" src="https://cdn.sheetjs.com/xlsx-0.19.1/package/dist/xlsx.full.min.js"></script>
<button onclick="doit('xlsx');" type="button" class="btn btn-success btn-block clickSavedataLides" style="margin: 1.2rem;width: 16.66666667%;margin-top: 3rem;">Создать отчет</button>
<script>
function doit(type, fn, dl) {
var elt = document.getElementById('top-students');
var wb = XLSX.utils.table_to_book(elt, {sheet:"Sheet JS"});
return dl ?
XLSX.write(wb, {bookType:type, bookSST:true, type: 'base64'}) :
XLSX.writeFile(wb, fn || ('SheetJSTableExport.' + (type || 'xlsx')));
}
</script>