@@ -7,9 +7,9 @@ exports.excelSheetFromDataSet = exports.excelSheetFromAoA = exports.dateToNumber
7
7
8
8
var _typeof = typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ? function ( obj ) { return typeof obj ; } : function ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ;
9
9
10
- var _tempaXlsx = require ( 'tempa- xlsx' ) ;
10
+ var _xlsx = require ( 'xlsx' ) ;
11
11
12
- var _tempaXlsx2 = _interopRequireDefault ( _tempaXlsx ) ;
12
+ var _xlsx2 = _interopRequireDefault ( _xlsx ) ;
13
13
14
14
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
15
15
@@ -66,7 +66,7 @@ var excelSheetFromDataSet = function excelSheetFromDataSet(dataSet) {
66
66
67
67
if ( columns . length >= 0 ) {
68
68
columns . forEach ( function ( col , index ) {
69
- var cellRef = _tempaXlsx2 . default . utils . encode_cell ( { c : xSteps + index , r : rowCount } ) ;
69
+ var cellRef = _xlsx2 . default . utils . encode_cell ( { c : xSteps + index , r : rowCount } ) ;
70
70
fixRange ( range , 0 , 0 , rowCount , xSteps , ySteps ) ;
71
71
getHeaderCell ( col , cellRef , ws ) ;
72
72
} ) ;
@@ -76,15 +76,15 @@ var excelSheetFromDataSet = function excelSheetFromDataSet(dataSet) {
76
76
77
77
for ( var R = 0 ; R != data . length ; ++ R , rowCount ++ ) {
78
78
for ( var C = 0 ; C != data [ R ] . length ; ++ C ) {
79
- var cellRef = _tempaXlsx2 . default . utils . encode_cell ( { c : C + xSteps , r : rowCount } ) ;
79
+ var cellRef = _xlsx2 . default . utils . encode_cell ( { c : C + xSteps , r : rowCount } ) ;
80
80
fixRange ( range , R , C , rowCount , xSteps , ySteps ) ;
81
81
getCell ( data [ R ] [ C ] , cellRef , ws ) ;
82
82
}
83
83
}
84
84
} ) ;
85
85
86
86
if ( range . s . c < 10000000 ) {
87
- ws [ '!ref' ] = _tempaXlsx2 . default . utils . encode_range ( range ) ;
87
+ ws [ '!ref' ] = _xlsx2 . default . utils . encode_range ( range ) ;
88
88
}
89
89
90
90
return ws ;
@@ -112,7 +112,7 @@ function getCell(v, cellRef, ws) {
112
112
cell . t = 'b' ;
113
113
} else if ( v instanceof Date ) {
114
114
cell . t = 'n' ;
115
- cell . z = _tempaXlsx2 . default . SSF . _table [ 14 ] ;
115
+ cell . z = _xlsx2 . default . SSF . _table [ 14 ] ;
116
116
cell . v = dateToNumber ( cell . v ) ;
117
117
} else if ( ( typeof v === 'undefined' ? 'undefined' : _typeof ( v ) ) === 'object' ) {
118
118
cell . v = v . value ;
@@ -169,14 +169,14 @@ var excelSheetFromAoA = function excelSheetFromAoA(data) {
169
169
continue ;
170
170
}
171
171
172
- var cellRef = _tempaXlsx2 . default . utils . encode_cell ( { c : C , r : R } ) ;
172
+ var cellRef = _xlsx2 . default . utils . encode_cell ( { c : C , r : R } ) ;
173
173
if ( typeof cell . v === 'number' ) {
174
174
cell . t = 'n' ;
175
175
} else if ( typeof cell . v === 'boolean' ) {
176
176
cell . t = 'b' ;
177
177
} else if ( cell . v instanceof Date ) {
178
178
cell . t = 'n' ;
179
- cell . z = _tempaXlsx2 . default . SSF . _table [ 14 ] ;
179
+ cell . z = _xlsx2 . default . SSF . _table [ 14 ] ;
180
180
cell . v = dateToNumber ( cell . v ) ;
181
181
} else {
182
182
cell . t = 's' ;
@@ -187,7 +187,7 @@ var excelSheetFromAoA = function excelSheetFromAoA(data) {
187
187
}
188
188
189
189
if ( range . s . c < 10000000 ) {
190
- ws [ '!ref' ] = _tempaXlsx2 . default . utils . encode_range ( range ) ;
190
+ ws [ '!ref' ] = _xlsx2 . default . utils . encode_range ( range ) ;
191
191
}
192
192
193
193
return ws ;
0 commit comments