I'm exporting some tabledata to Excel using the Jquery module Table2Excel. It works fine but Excel throws the following error when opening.
After closing the message box the data shows up. There is an accepted answer to this issue here: Excel Error However, it does not fix the problem.
Here is the function:
<script src="https://cdn.rawgit.com/unconditional/jquery-table2excel/master/src/jquery.table2excel.js"></script>
<script>
jQuery(document).ready(function() {
$('#exportNow').on('click', function(e){
e.preventDefault();
ResultsToTable();
});
function ResultsToTable(){
$("#tabledata").table2excel({
exclude: ".noExl", //this class data should not be excluded in excel
filename: "SummaryReport"
});
}
});
</script>