jExcel: Excel-Like jQuery Spreadsheet Plugin
Add-ons

Plugin Description: jexcel.js is a lightweight jQuery spreadsheet plugin similar to Excel.
Quick Tutorial
jexcel.js is a lightweight jQuery spreadsheet plugin similar to Excel. You can provide data to a jexcel spreadsheet using JavaScript arrays, JSON data, or CSV files. You can even copy and paste data directly from an Excel spreadsheet into a jexcel spreadsheet.
Usage
Include the jquery, jquery.jexcel.js, and jquery.jexcel.css files in the page.
1 2 3 | <link rel="stylesheet" type="text/css" href="css/jquery.jexcel.css" /><script src="js/jquery.min.js"></script><script src="js/jquery.jexcel.js"></script> |
HTML Structure
Use a <div> container as the container for the jexcel spreadsheet.
1 | <div id="my"></div> |
Initialize the Plugin
After the page DOM elements have finished loading, initialize the jexcel spreadsheet using the following code.
1 2 3 4 5 | data = [ ['Google', 1998, 807.80], ['Apple', 1976, 116.52], ['Yahoo', 1994, 38.66],]; |
1 | $('#mytable').jexcel({ data:data, colWidths: [ 300, 80, 100 ] }); |
评论