$ npm install xlsx // 导入模块
<input type="file" ref="upload" name="file" accept=".xls,.xlsx" />
mounted() {
this.$refs.upload.addEventListener('change', e => {
//绑定监听表格导入事件
this.readExcel(e);
})
},
methods: {
readExcel(e){
let ws, data, wsname;
let ws1 = "";
let that = this;
let files = e.target.files;
if(files.
完美的Excel导入,获取表格数据
最新推荐文章于 2021-02-23 14:45:38 发布