@cj-tech-master/excelts 5.0.4 → 5.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/modules/excel/stream/worksheet-reader.js +3 -3
- package/dist/browser/modules/excel/stream/worksheet-writer.js +1 -1
- package/dist/browser/modules/excel/xlsx/xform/sheet/cell-xform.js +1 -1
- package/dist/browser/modules/excel/xlsx/xform/sheet/col-xform.js +1 -1
- package/dist/browser/modules/excel/xlsx/xform/sheet/row-xform.js +1 -1
- package/dist/cjs/modules/excel/stream/worksheet-reader.js +3 -3
- package/dist/cjs/modules/excel/stream/worksheet-writer.js +1 -1
- package/dist/cjs/modules/excel/xlsx/xform/sheet/cell-xform.js +1 -1
- package/dist/cjs/modules/excel/xlsx/xform/sheet/col-xform.js +1 -1
- package/dist/cjs/modules/excel/xlsx/xform/sheet/row-xform.js +1 -1
- package/dist/esm/modules/excel/stream/worksheet-reader.js +3 -3
- package/dist/esm/modules/excel/stream/worksheet-writer.js +1 -1
- package/dist/esm/modules/excel/xlsx/xform/sheet/cell-xform.js +1 -1
- package/dist/esm/modules/excel/xlsx/xform/sheet/col-xform.js +1 -1
- package/dist/esm/modules/excel/xlsx/xform/sheet/row-xform.js +1 -1
- package/dist/iife/excelts.iife.js +8 -8
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +4 -4
- package/package.json +1 -1
|
@@ -176,7 +176,7 @@ class WorksheetReader extends EventEmitter {
|
|
|
176
176
|
if (node.attributes.ht) {
|
|
177
177
|
row.height = parseFloat(node.attributes.ht);
|
|
178
178
|
}
|
|
179
|
-
if (node.attributes.s) {
|
|
179
|
+
if (node.attributes.s !== undefined) {
|
|
180
180
|
const styleId = parseInt(node.attributes.s, 10);
|
|
181
181
|
const style = styles.getStyleModel(styleId);
|
|
182
182
|
if (style) {
|
|
@@ -190,7 +190,7 @@ class WorksheetReader extends EventEmitter {
|
|
|
190
190
|
const styleAttr = node.attributes.s;
|
|
191
191
|
c = {
|
|
192
192
|
ref: node.attributes.r,
|
|
193
|
-
s: styleAttr ? parseInt(styleAttr, 10) :
|
|
193
|
+
s: styleAttr !== undefined ? parseInt(styleAttr, 10) : undefined,
|
|
194
194
|
t: node.attributes.t
|
|
195
195
|
};
|
|
196
196
|
}
|
|
@@ -273,7 +273,7 @@ class WorksheetReader extends EventEmitter {
|
|
|
273
273
|
if (row && c) {
|
|
274
274
|
const address = colCache.decodeAddress(c.ref);
|
|
275
275
|
const cell = row.getCell(address.col);
|
|
276
|
-
if (c.s) {
|
|
276
|
+
if (c.s !== undefined) {
|
|
277
277
|
const style = styles.getStyleModel(c.s);
|
|
278
278
|
if (style) {
|
|
279
279
|
cell.style = style;
|
|
@@ -393,7 +393,7 @@ class CellXform extends BaseXform {
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
reconcile(model, options) {
|
|
396
|
-
const style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId);
|
|
396
|
+
const style = model.styleId !== undefined && options.styles && options.styles.getStyleModel(model.styleId);
|
|
397
397
|
if (style) {
|
|
398
398
|
model.style = style;
|
|
399
399
|
}
|
|
@@ -145,7 +145,7 @@ class RowXform extends BaseXform {
|
|
|
145
145
|
return false;
|
|
146
146
|
}
|
|
147
147
|
reconcile(model, options) {
|
|
148
|
-
model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {};
|
|
148
|
+
model.style = model.styleId !== undefined ? options.styles.getStyleModel(model.styleId) : {};
|
|
149
149
|
if (model.styleId !== undefined) {
|
|
150
150
|
model.styleId = undefined;
|
|
151
151
|
}
|
|
@@ -179,7 +179,7 @@ class WorksheetReader extends _stream_1.EventEmitter {
|
|
|
179
179
|
if (node.attributes.ht) {
|
|
180
180
|
row.height = parseFloat(node.attributes.ht);
|
|
181
181
|
}
|
|
182
|
-
if (node.attributes.s) {
|
|
182
|
+
if (node.attributes.s !== undefined) {
|
|
183
183
|
const styleId = parseInt(node.attributes.s, 10);
|
|
184
184
|
const style = styles.getStyleModel(styleId);
|
|
185
185
|
if (style) {
|
|
@@ -193,7 +193,7 @@ class WorksheetReader extends _stream_1.EventEmitter {
|
|
|
193
193
|
const styleAttr = node.attributes.s;
|
|
194
194
|
c = {
|
|
195
195
|
ref: node.attributes.r,
|
|
196
|
-
s: styleAttr ? parseInt(styleAttr, 10) :
|
|
196
|
+
s: styleAttr !== undefined ? parseInt(styleAttr, 10) : undefined,
|
|
197
197
|
t: node.attributes.t
|
|
198
198
|
};
|
|
199
199
|
}
|
|
@@ -276,7 +276,7 @@ class WorksheetReader extends _stream_1.EventEmitter {
|
|
|
276
276
|
if (row && c) {
|
|
277
277
|
const address = col_cache_1.colCache.decodeAddress(c.ref);
|
|
278
278
|
const cell = row.getCell(address.col);
|
|
279
|
-
if (c.s) {
|
|
279
|
+
if (c.s !== undefined) {
|
|
280
280
|
const style = styles.getStyleModel(c.s);
|
|
281
281
|
if (style) {
|
|
282
282
|
cell.style = style;
|
|
@@ -396,7 +396,7 @@ class CellXform extends base_xform_1.BaseXform {
|
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
reconcile(model, options) {
|
|
399
|
-
const style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId);
|
|
399
|
+
const style = model.styleId !== undefined && options.styles && options.styles.getStyleModel(model.styleId);
|
|
400
400
|
if (style) {
|
|
401
401
|
model.style = style;
|
|
402
402
|
}
|
|
@@ -148,7 +148,7 @@ class RowXform extends base_xform_1.BaseXform {
|
|
|
148
148
|
return false;
|
|
149
149
|
}
|
|
150
150
|
reconcile(model, options) {
|
|
151
|
-
model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {};
|
|
151
|
+
model.style = model.styleId !== undefined ? options.styles.getStyleModel(model.styleId) : {};
|
|
152
152
|
if (model.styleId !== undefined) {
|
|
153
153
|
model.styleId = undefined;
|
|
154
154
|
}
|
|
@@ -176,7 +176,7 @@ class WorksheetReader extends EventEmitter {
|
|
|
176
176
|
if (node.attributes.ht) {
|
|
177
177
|
row.height = parseFloat(node.attributes.ht);
|
|
178
178
|
}
|
|
179
|
-
if (node.attributes.s) {
|
|
179
|
+
if (node.attributes.s !== undefined) {
|
|
180
180
|
const styleId = parseInt(node.attributes.s, 10);
|
|
181
181
|
const style = styles.getStyleModel(styleId);
|
|
182
182
|
if (style) {
|
|
@@ -190,7 +190,7 @@ class WorksheetReader extends EventEmitter {
|
|
|
190
190
|
const styleAttr = node.attributes.s;
|
|
191
191
|
c = {
|
|
192
192
|
ref: node.attributes.r,
|
|
193
|
-
s: styleAttr ? parseInt(styleAttr, 10) :
|
|
193
|
+
s: styleAttr !== undefined ? parseInt(styleAttr, 10) : undefined,
|
|
194
194
|
t: node.attributes.t
|
|
195
195
|
};
|
|
196
196
|
}
|
|
@@ -273,7 +273,7 @@ class WorksheetReader extends EventEmitter {
|
|
|
273
273
|
if (row && c) {
|
|
274
274
|
const address = colCache.decodeAddress(c.ref);
|
|
275
275
|
const cell = row.getCell(address.col);
|
|
276
|
-
if (c.s) {
|
|
276
|
+
if (c.s !== undefined) {
|
|
277
277
|
const style = styles.getStyleModel(c.s);
|
|
278
278
|
if (style) {
|
|
279
279
|
cell.style = style;
|
|
@@ -393,7 +393,7 @@ class CellXform extends BaseXform {
|
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
395
|
reconcile(model, options) {
|
|
396
|
-
const style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId);
|
|
396
|
+
const style = model.styleId !== undefined && options.styles && options.styles.getStyleModel(model.styleId);
|
|
397
397
|
if (style) {
|
|
398
398
|
model.style = style;
|
|
399
399
|
}
|
|
@@ -145,7 +145,7 @@ class RowXform extends BaseXform {
|
|
|
145
145
|
return false;
|
|
146
146
|
}
|
|
147
147
|
reconcile(model, options) {
|
|
148
|
-
model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {};
|
|
148
|
+
model.style = model.styleId !== undefined ? options.styles.getStyleModel(model.styleId) : {};
|
|
149
149
|
if (model.styleId !== undefined) {
|
|
150
150
|
model.styleId = undefined;
|
|
151
151
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @cj-tech-master/excelts v5.0.
|
|
2
|
+
* @cj-tech-master/excelts v5.0.5
|
|
3
3
|
* TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.
|
|
4
4
|
* (c) 2026 cjnoname
|
|
5
5
|
* Released under the MIT License
|
|
@@ -11431,7 +11431,7 @@ var ExcelTS = (function(exports) {
|
|
|
11431
11431
|
}
|
|
11432
11432
|
}
|
|
11433
11433
|
reconcile(model, options) {
|
|
11434
|
-
const style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId);
|
|
11434
|
+
const style = model.styleId !== void 0 && options.styles && options.styles.getStyleModel(model.styleId);
|
|
11435
11435
|
if (style) model.style = style;
|
|
11436
11436
|
if (model.styleId !== void 0) model.styleId = void 0;
|
|
11437
11437
|
switch (model.type) {
|
|
@@ -11576,7 +11576,7 @@ var ExcelTS = (function(exports) {
|
|
|
11576
11576
|
return false;
|
|
11577
11577
|
}
|
|
11578
11578
|
reconcile(model, options) {
|
|
11579
|
-
model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {};
|
|
11579
|
+
model.style = model.styleId !== void 0 ? options.styles.getStyleModel(model.styleId) : {};
|
|
11580
11580
|
if (model.styleId !== void 0) model.styleId = void 0;
|
|
11581
11581
|
const cellXform = this.map.c;
|
|
11582
11582
|
model.cells.forEach((cellModel) => {
|
|
@@ -11629,7 +11629,7 @@ var ExcelTS = (function(exports) {
|
|
|
11629
11629
|
return false;
|
|
11630
11630
|
}
|
|
11631
11631
|
reconcile(model, options) {
|
|
11632
|
-
if (model.styleId) model.style = options.styles.getStyleModel(model.styleId);
|
|
11632
|
+
if (model.styleId !== void 0) model.style = options.styles.getStyleModel(model.styleId);
|
|
11633
11633
|
}
|
|
11634
11634
|
};
|
|
11635
11635
|
|
|
@@ -23256,7 +23256,7 @@ var ExcelTS = (function(exports) {
|
|
|
23256
23256
|
const n = this._nextRow;
|
|
23257
23257
|
for (let i = this._rowZero; i < n; i++) callback(this.getRow(i), i);
|
|
23258
23258
|
} else this._rows.forEach((row) => {
|
|
23259
|
-
if (row.hasValues) callback(row, row.number);
|
|
23259
|
+
if (row && row.hasValues) callback(row, row.number);
|
|
23260
23260
|
});
|
|
23261
23261
|
}
|
|
23262
23262
|
_commitRow(cRow) {
|
|
@@ -25258,7 +25258,7 @@ onmessage = async (ev) => {
|
|
|
25258
25258
|
const r = parseInt(node.attributes.r, 10);
|
|
25259
25259
|
row = new Row(this, r);
|
|
25260
25260
|
if (node.attributes.ht) row.height = parseFloat(node.attributes.ht);
|
|
25261
|
-
if (node.attributes.s) {
|
|
25261
|
+
if (node.attributes.s !== void 0) {
|
|
25262
25262
|
const styleId = parseInt(node.attributes.s, 10);
|
|
25263
25263
|
const style = styles.getStyleModel(styleId);
|
|
25264
25264
|
if (style) row.style = style;
|
|
@@ -25270,7 +25270,7 @@ onmessage = async (ev) => {
|
|
|
25270
25270
|
const styleAttr = node.attributes.s;
|
|
25271
25271
|
c = {
|
|
25272
25272
|
ref: node.attributes.r,
|
|
25273
|
-
s: styleAttr ? parseInt(styleAttr, 10) : 0,
|
|
25273
|
+
s: styleAttr !== void 0 ? parseInt(styleAttr, 10) : void 0,
|
|
25274
25274
|
t: node.attributes.t
|
|
25275
25275
|
};
|
|
25276
25276
|
}
|
|
@@ -25335,7 +25335,7 @@ onmessage = async (ev) => {
|
|
|
25335
25335
|
if (row && c) {
|
|
25336
25336
|
const address = colCache.decodeAddress(c.ref);
|
|
25337
25337
|
const cell = row.getCell(address.col);
|
|
25338
|
-
if (c.s) {
|
|
25338
|
+
if (c.s !== void 0) {
|
|
25339
25339
|
const style = styles.getStyleModel(c.s);
|
|
25340
25340
|
if (style) cell.style = style;
|
|
25341
25341
|
}
|