function exportGrid(tableid,filename) { var table= document.getElementById(tableid); $("table tr td:last-child").replaceWith(""); var html = table.outerHTML; var a = document.createElement('a'); a.id = 'ExcelDL'; a.href = 'data:application/vnd.ms-excel,' + escape(html); a.download = filename + ".xls"; document.body.appendChild(a); a.click(); // location.reload(); // document.getElementById('ExcelDL').remove(); } i have this function on jSP and i want to export a table with pagination, the trouble is, that function just export de view of the greed