Files
dbgate/packages/api/src/controllers/files.js
2020-11-19 10:30:06 +01:00

13 lines
274 B
JavaScript

const xlsx = require('xlsx');
const _ = require('lodash');
module.exports = {
openedReaders: {},
analyseExcel_meta: 'get',
async analyseExcel({ filePath }) {
const workbook = xlsx.readFile(filePath, { bookSheets: true });
return workbook.SheetNames;
},
};