|
@@ -170,12 +170,15 @@ class SchoolService extends CrudService {
|
|
|
async getImportXLSXData(filepath, termid, schid, planid, planyearid, type, batchid) {
|
|
|
console.log(filepath);
|
|
|
const file = await this.ctx.curl(filepath);
|
|
|
- console.log(file);
|
|
|
const workbook = XLSX.read(file.data);
|
|
|
+ console.log(workbook);
|
|
|
// 读取内容
|
|
|
let exceldata = [];
|
|
|
const sheetNames = workbook.SheetNames; // 获取表名
|
|
|
+ console.log(sheetNames);
|
|
|
const sheet = workbook.Sheets[sheetNames[0]]; // 通过表名得到表对象
|
|
|
+ console.log(sheet);
|
|
|
+
|
|
|
// 遍历26个字母
|
|
|
console.log('in function:');
|
|
|
const theadRule = [];
|