let xlsx = require('xlsx');
let fs = require('fs')
let workbook = xlsx.readFile('1.xls'); //workbook就是xls文档对象
let sheetNames = workbook.SheetNames; //获取表明
let sheet = workbook.Sheets[sheetNames[0]]; //通过表明得到表对象
var data = xlsx.utils.sheet_to_json(sheet); //通过工具将表对象的数据读出来并转成json
let d = {
"code": 200,
"success": true,
"message": "操作成功",
"resultData": {
"varList": [],//存放json数据
"Page": {
"showCount": 10,
"totalPage": 1,
"totalResult": 8,
"currentPage": 1,
"currentResult": 0,
"timestamp": 1610681189571