纯前端展示excel表格
fork from : https://github.com/sumile-ting/excel-preview.git
|
5 år sedan | |
---|---|---|
css | 5 år sedan | |
js | 5 år sedan | |
.babelrc | 5 år sedan | |
.gitignore | 5 år sedan | |
README.md | 5 år sedan | |
gulpfile.js | 5 år sedan | |
index.html | 5 år sedan | |
package-lock.json | 6 år sedan | |
package.json | 5 år sedan |
选择一个excel文件,将所选得excel表格展示在页面上
npm install excel-preview --save
<script src="node_modules/jquery/dist/jquery.min.js" type="text/javascript"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="node_modules/bootstrap-table/dist/bootstrap-table.min.js" type="text/javascript"></script>
<script src="node_modules/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js" type="text/javascript"></script>
<script src="node_modules/xlsx-style/dist/xlsx.full.min.js" type="text/javascript"></script>
<script src="js/dist/excel-preview.min.js"></script>
<link rel="stylesheet" href="css/excel-preview.css">
<input type="file" name="file">
<div id="yourExcelTable"></div>
$("#yourExcelTable").excelPreview({});
Contains a simple HTML file to demonstrate the plugin.
dist/ This is where the generated files are stored once gulp runs.
gulpfile.js Contains all automated tasks using fulp.
package.json Specify all dependencies loaded via Node.JS.
Check NPM for more details.
MIT License