@cj-tech-master/excelts 1.6.1 → 1.6.2
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/README.md +0 -15
- package/README_zh.md +0 -15
- package/dist/browser/excelts.iife.js +1 -22
- package/dist/browser/excelts.iife.js.map +1 -1
- package/dist/browser/excelts.iife.min.js +1 -1
- package/dist/cjs/doc/worksheet.js +2 -21
- package/dist/esm/doc/worksheet.js +2 -21
- package/dist/types/doc/worksheet.d.ts +6 -27
- package/package.json +5 -5
|
@@ -372,9 +372,7 @@ class Worksheet {
|
|
|
372
372
|
});
|
|
373
373
|
return count;
|
|
374
374
|
}
|
|
375
|
-
|
|
376
|
-
* Get or create row by 1-based index
|
|
377
|
-
*/
|
|
375
|
+
// get a row by row number.
|
|
378
376
|
getRow(r) {
|
|
379
377
|
let row = this._rows[r - 1];
|
|
380
378
|
if (!row) {
|
|
@@ -382,9 +380,7 @@ class Worksheet {
|
|
|
382
380
|
}
|
|
383
381
|
return row;
|
|
384
382
|
}
|
|
385
|
-
|
|
386
|
-
* Get or create rows by 1-based index
|
|
387
|
-
*/
|
|
383
|
+
// get multiple rows by row number.
|
|
388
384
|
getRows(start, length) {
|
|
389
385
|
if (length < 1) {
|
|
390
386
|
return undefined;
|
|
@@ -395,10 +391,6 @@ class Worksheet {
|
|
|
395
391
|
}
|
|
396
392
|
return rows;
|
|
397
393
|
}
|
|
398
|
-
/**
|
|
399
|
-
* Add a couple of Rows by key-value, after the last current row, using the column keys,
|
|
400
|
-
* or add a row by contiguous Array (assign to columns A, B & C)
|
|
401
|
-
*/
|
|
402
394
|
addRow(value, style = "n") {
|
|
403
395
|
const rowNo = this._nextRow;
|
|
404
396
|
const row = this.getRow(rowNo);
|
|
@@ -406,9 +398,6 @@ class Worksheet {
|
|
|
406
398
|
this._setStyleOption(rowNo, style[0] === "i" ? style : "n");
|
|
407
399
|
return row;
|
|
408
400
|
}
|
|
409
|
-
/**
|
|
410
|
-
* Add multiple rows by providing an array of arrays or key-value pairs
|
|
411
|
-
*/
|
|
412
401
|
addRows(value, style = "n") {
|
|
413
402
|
const rows = [];
|
|
414
403
|
value.forEach(row => {
|
|
@@ -416,19 +405,11 @@ class Worksheet {
|
|
|
416
405
|
});
|
|
417
406
|
return rows;
|
|
418
407
|
}
|
|
419
|
-
/**
|
|
420
|
-
* Insert a Row by key-value, at the position (shifting down all rows from position),
|
|
421
|
-
* using the column keys, or add a row by contiguous Array (assign to columns A, B & C)
|
|
422
|
-
*/
|
|
423
408
|
insertRow(pos, value, style = "n") {
|
|
424
409
|
this.spliceRows(pos, 0, value);
|
|
425
410
|
this._setStyleOption(pos, style);
|
|
426
411
|
return this.getRow(pos);
|
|
427
412
|
}
|
|
428
|
-
/**
|
|
429
|
-
* Insert multiple rows at position (shifting down all rows from position)
|
|
430
|
-
* by providing an array of arrays or key-value pairs
|
|
431
|
-
*/
|
|
432
413
|
insertRows(pos, values, style = "n") {
|
|
433
414
|
this.spliceRows(pos, 0, ...values);
|
|
434
415
|
if (style !== "n") {
|
|
@@ -369,9 +369,7 @@ class Worksheet {
|
|
|
369
369
|
});
|
|
370
370
|
return count;
|
|
371
371
|
}
|
|
372
|
-
|
|
373
|
-
* Get or create row by 1-based index
|
|
374
|
-
*/
|
|
372
|
+
// get a row by row number.
|
|
375
373
|
getRow(r) {
|
|
376
374
|
let row = this._rows[r - 1];
|
|
377
375
|
if (!row) {
|
|
@@ -379,9 +377,7 @@ class Worksheet {
|
|
|
379
377
|
}
|
|
380
378
|
return row;
|
|
381
379
|
}
|
|
382
|
-
|
|
383
|
-
* Get or create rows by 1-based index
|
|
384
|
-
*/
|
|
380
|
+
// get multiple rows by row number.
|
|
385
381
|
getRows(start, length) {
|
|
386
382
|
if (length < 1) {
|
|
387
383
|
return undefined;
|
|
@@ -392,10 +388,6 @@ class Worksheet {
|
|
|
392
388
|
}
|
|
393
389
|
return rows;
|
|
394
390
|
}
|
|
395
|
-
/**
|
|
396
|
-
* Add a couple of Rows by key-value, after the last current row, using the column keys,
|
|
397
|
-
* or add a row by contiguous Array (assign to columns A, B & C)
|
|
398
|
-
*/
|
|
399
391
|
addRow(value, style = "n") {
|
|
400
392
|
const rowNo = this._nextRow;
|
|
401
393
|
const row = this.getRow(rowNo);
|
|
@@ -403,9 +395,6 @@ class Worksheet {
|
|
|
403
395
|
this._setStyleOption(rowNo, style[0] === "i" ? style : "n");
|
|
404
396
|
return row;
|
|
405
397
|
}
|
|
406
|
-
/**
|
|
407
|
-
* Add multiple rows by providing an array of arrays or key-value pairs
|
|
408
|
-
*/
|
|
409
398
|
addRows(value, style = "n") {
|
|
410
399
|
const rows = [];
|
|
411
400
|
value.forEach(row => {
|
|
@@ -413,19 +402,11 @@ class Worksheet {
|
|
|
413
402
|
});
|
|
414
403
|
return rows;
|
|
415
404
|
}
|
|
416
|
-
/**
|
|
417
|
-
* Insert a Row by key-value, at the position (shifting down all rows from position),
|
|
418
|
-
* using the column keys, or add a row by contiguous Array (assign to columns A, B & C)
|
|
419
|
-
*/
|
|
420
405
|
insertRow(pos, value, style = "n") {
|
|
421
406
|
this.spliceRows(pos, 0, value);
|
|
422
407
|
this._setStyleOption(pos, style);
|
|
423
408
|
return this.getRow(pos);
|
|
424
409
|
}
|
|
425
|
-
/**
|
|
426
|
-
* Insert multiple rows at position (shifting down all rows from position)
|
|
427
|
-
* by providing an array of arrays or key-value pairs
|
|
428
|
-
*/
|
|
429
410
|
insertRows(pos, values, style = "n") {
|
|
430
411
|
this.spliceRows(pos, 0, ...values);
|
|
431
412
|
if (style !== "n") {
|
|
@@ -220,33 +220,12 @@ declare class Worksheet {
|
|
|
220
220
|
* A count of the number of rows that have values. If a mid-document row is empty, it will not be included in the count.
|
|
221
221
|
*/
|
|
222
222
|
get actualRowCount(): number;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
*/
|
|
230
|
-
getRows(start: number, length: number): Row[] | undefined;
|
|
231
|
-
/**
|
|
232
|
-
* Add a couple of Rows by key-value, after the last current row, using the column keys,
|
|
233
|
-
* or add a row by contiguous Array (assign to columns A, B & C)
|
|
234
|
-
*/
|
|
235
|
-
addRow(value: RowValues, style?: string): Row;
|
|
236
|
-
/**
|
|
237
|
-
* Add multiple rows by providing an array of arrays or key-value pairs
|
|
238
|
-
*/
|
|
239
|
-
addRows(value: RowValues[], style?: string): Row[];
|
|
240
|
-
/**
|
|
241
|
-
* Insert a Row by key-value, at the position (shifting down all rows from position),
|
|
242
|
-
* using the column keys, or add a row by contiguous Array (assign to columns A, B & C)
|
|
243
|
-
*/
|
|
244
|
-
insertRow(pos: number, value: RowValues, style?: string): Row;
|
|
245
|
-
/**
|
|
246
|
-
* Insert multiple rows at position (shifting down all rows from position)
|
|
247
|
-
* by providing an array of arrays or key-value pairs
|
|
248
|
-
*/
|
|
249
|
-
insertRows(pos: number, values: RowValues[], style?: string): Row[] | undefined;
|
|
223
|
+
getRow(r: number): any;
|
|
224
|
+
getRows(start: number, length: number): any[] | undefined;
|
|
225
|
+
addRow(value: any, style?: string): any;
|
|
226
|
+
addRows(value: any[], style?: string): any[];
|
|
227
|
+
insertRow(pos: number, value: any, style?: string): any;
|
|
228
|
+
insertRows(pos: number, values: any[], style?: string): Row[] | undefined;
|
|
250
229
|
_setStyleOption(pos: number, style?: string): void;
|
|
251
230
|
_copyStyle(src: number, dest: number, styleEmpty?: boolean): void;
|
|
252
231
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cj-tech-master/excelts",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@types/node": "^25.0.3",
|
|
111
111
|
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
112
112
|
"@typescript-eslint/parser": "^8.50.0",
|
|
113
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
113
|
+
"@typescript/native-preview": "^7.0.0-dev.20251219.1",
|
|
114
114
|
"@vitest/browser": "^4.0.16",
|
|
115
115
|
"@vitest/browser-playwright": "^4.0.16",
|
|
116
116
|
"@vitest/ui": "^4.0.16",
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
"eslint-config-prettier": "^10.1.8",
|
|
121
121
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
122
122
|
"eslint-plugin-import-x": "^4.16.1",
|
|
123
|
-
"eslint-plugin-oxlint": "^1.
|
|
123
|
+
"eslint-plugin-oxlint": "^1.34.0",
|
|
124
124
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
125
125
|
"express": "^5.2.1",
|
|
126
126
|
"fast-xml-parser": "^5.3.3",
|
|
127
127
|
"husky": "^9.1.7",
|
|
128
128
|
"node-stdlib-browser": "^1.3.1",
|
|
129
129
|
"nodemon": "^3.1.11",
|
|
130
|
-
"oxlint": "^1.
|
|
130
|
+
"oxlint": "^1.34.0",
|
|
131
131
|
"playwright": "^1.57.0",
|
|
132
132
|
"prettier": "^3.7.4",
|
|
133
133
|
"rimraf": "^6.1.2",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"tslib": "^2.8.1",
|
|
137
137
|
"typescript": "^5.9.3",
|
|
138
138
|
"typescript-eslint": "^8.50.0",
|
|
139
|
-
"vite-tsconfig-paths": "^6.0.
|
|
139
|
+
"vite-tsconfig-paths": "^6.0.3",
|
|
140
140
|
"vitest": "^4.0.16"
|
|
141
141
|
},
|
|
142
142
|
"scripts": {
|