Sunday 17 March 2013

Easiest JS Code for Exporting HTML Table to Excel

<script>
function function_name(){
var table=document.getElementById("tableid");
var html=table.outerHTML;
window.open('data:application/vnd.ms-excel,'+encodeURIComponent(html));
}
</script>

No comments:

Post a Comment