lrf402788946 vor 4 Jahren
Ursprung
Commit
fa93b060b0
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      app/service/school.js

+ 4 - 1
app/service/school.js

@@ -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 = [];