Created
July 4, 2014 00:12
-
-
Save caot/c020bdbcf0fc9933b41e to your computer and use it in GitHub Desktop.
html table to excel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. include the following two jaascript | |
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> | |
<script src="https://raw.githubusercontent.com/caot/battatech_excelexport/master/Scripts/jquery.battatech.excelexport.js"></script> | |
2. Add the folling behind the targeted table with id = "tblExport" | |
<script> | |
$(document).ready(function () { | |
$("#btnExport").click(function () { | |
$("#tblExport").btechco_excelexport({ | |
containerid: "tblExport" | |
, datatype: $datatype.Table | |
}); | |
}); | |
}); | |
</script> | |
<div><button id="btnExport">Export to excel</button></div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment