lrf402788946 hace 4 años
padre
commit
b30e0c55a2
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      app/service/util.js

+ 2 - 2
app/service/util.js

@@ -259,8 +259,8 @@ class UtilService extends CrudService {
       await workbook.xlsx.load(file.data);
       sheet = workbook.getWorksheet('sheet');
     }
-    if (!type) sheet.addRows(dataList);
-    else {
+    if (!type || type === 'horizontal') sheet.addRows(dataList);
+    else if (type === 'vertical') {
       for (let i = 1; i <= dataList.length; i++) {
         const element = dataList[i - 1];
         const rows = sheet.getRow(i);