diff --git a/src/plugin/export/_export2Excel.js b/src/plugin/export/_export2Excel.js index 11ae45b7..6037bbd6 100755 --- a/src/plugin/export/_export2Excel.js +++ b/src/plugin/export/_export2Excel.js @@ -17,25 +17,20 @@ function generateArray(table) { var rowspan = cell.getAttribute('rowspan'); var cellValue = cell.innerText; if (cellValue !== "" && cellValue == +cellValue) cellValue = +cellValue; - //Skip ranges ranges.forEach(function (range) { if (R >= range.s.r && R <= range.e.r && outRow.length >= range.s.c && outRow.length <= range.e.c) { for (var i = 0; i <= range.e.c - range.s.c; ++i) outRow.push(null); } }); - //Handle Row Span if (rowspan || colspan) { rowspan = rowspan || 1; colspan = colspan || 1; ranges.push({s: {r: R, c: outRow.length}, e: {r: R + rowspan - 1, c: outRow.length + colspan - 1}}); - } - ; - + }; //Handle Value outRow.push(cellValue !== "" ? cellValue : null); - //Handle Colspan if (colspan) for (var k = 0; k < colspan - 1; ++k) outRow.push(null); } diff --git a/src/plugin/export/index.js b/src/plugin/export/index.js index b7f4faeb..732a9131 100644 --- a/src/plugin/export/index.js +++ b/src/plugin/export/index.js @@ -1,7 +1,7 @@ // εΊ“ import Csv from './_csv' import ExportCsv from './_export-csv' -import * as excel from './_export2Excel' +import * as Excel from './_export2Excel' export default { install (Vue, options) { Vue.prototype.$export = { @@ -29,7 +29,7 @@ export default { excel () { const tHeader = ['Id', 'Title', 'Author', 'Readings', 'Date'] const data = [] - excel.export_json_to_excel(tHeader, data, 'demo') + Excel.export_json_to_excel(tHeader, data, 'demo') } } }