@js-ak/excel-toolbox 1.5.0 → 1.6.0

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.
Files changed (25) hide show
  1. package/README.md +41 -62
  2. package/build/cjs/lib/template/template-fs.js +137 -57
  3. package/build/cjs/lib/template/template-memory.js +281 -59
  4. package/build/cjs/lib/template/utils/index.js +25 -0
  5. package/build/cjs/lib/template/utils/prepare-row-to-cells.js +5 -1
  6. package/build/cjs/lib/template/utils/regexp.js +32 -0
  7. package/build/cjs/lib/template/utils/update-dimension.js +15 -0
  8. package/build/cjs/lib/template/utils/validate-worksheet-xml.js +74 -74
  9. package/build/cjs/lib/template/utils/write-rows-to-stream.js +57 -17
  10. package/build/esm/lib/template/template-fs.js +134 -57
  11. package/build/esm/lib/template/template-memory.js +281 -59
  12. package/build/esm/lib/template/utils/index.js +2 -0
  13. package/build/esm/lib/template/utils/prepare-row-to-cells.js +5 -1
  14. package/build/esm/lib/template/utils/regexp.js +28 -0
  15. package/build/esm/lib/template/utils/update-dimension.js +15 -0
  16. package/build/esm/lib/template/utils/validate-worksheet-xml.js +74 -74
  17. package/build/esm/lib/template/utils/write-rows-to-stream.js +57 -17
  18. package/build/types/lib/template/template-fs.d.ts +2 -0
  19. package/build/types/lib/template/template-memory.d.ts +61 -0
  20. package/build/types/lib/template/utils/index.d.ts +2 -0
  21. package/build/types/lib/template/utils/prepare-row-to-cells.d.ts +5 -1
  22. package/build/types/lib/template/utils/regexp.d.ts +24 -0
  23. package/build/types/lib/template/utils/update-dimension.d.ts +15 -0
  24. package/build/types/lib/template/utils/write-rows-to-stream.d.ts +22 -9
  25. package/package.json +1 -1
@@ -30,9 +30,7 @@ export function validateWorksheetXml(xml) {
30
30
  const requiredElements = [
31
31
  { name: "sheetViews", tag: "<sheetViews>" },
32
32
  { name: "sheetFormatPr", tag: "<sheetFormatPr" },
33
- { name: "cols", tag: "<cols>" },
34
33
  { name: "sheetData", tag: "<sheetData>" },
35
- { name: "mergeCells", tag: "<mergeCells" },
36
34
  ];
37
35
  for (const { name, tag } of requiredElements) {
38
36
  if (!xml.includes(tag)) {
@@ -97,59 +95,82 @@ export function validateWorksheetXml(xml) {
97
95
  }
98
96
  }
99
97
  // 4. Check mergeCells
100
- const mergeCellsStart = xml.indexOf("<mergeCells");
101
- const mergeCellsEnd = xml.indexOf("</mergeCells>");
102
- if (mergeCellsStart === -1 || mergeCellsEnd === -1) {
103
- return createError("Invalid mergeCells structure");
104
- }
105
- const mergeCellsContent = xml.substring(mergeCellsStart, mergeCellsEnd);
106
- const countMatch = mergeCellsContent.match(/count="(\d+)"/);
107
- if (!countMatch) {
108
- return createError("Count attribute not specified for mergeCells");
109
- }
110
- const mergeCellTags = mergeCellsContent.match(/<mergeCell\s+ref="([A-Z]+\d+:[A-Z]+\d+)"\s*\/>/g);
111
- if (!mergeCellTags) {
112
- return createError("No merged cells found");
113
- }
114
- // Check if the number of mergeCells matches the count attribute
115
- if (mergeCellTags.length !== parseInt(countMatch[1])) {
116
- return createError("Mismatch in the number of merged cells", `Expected: ${countMatch[1]}, found: ${mergeCellTags.length}`);
117
- }
118
- // Check for duplicates of mergeCell
119
- const mergeRefs = new Set();
120
- const duplicates = new Set();
121
- for (const mergeTag of mergeCellTags) {
122
- const refMatch = mergeTag.match(/ref="([A-Z]+\d+:[A-Z]+\d+)"/);
123
- if (!refMatch) {
124
- return createError("Invalid merge cell format", `Tag: ${mergeTag}`);
125
- }
126
- const ref = refMatch[1];
127
- if (mergeRefs.has(ref)) {
128
- duplicates.add(ref);
98
+ if (xml.includes("<mergeCells")) {
99
+ const mergeCellsStart = xml.indexOf("<mergeCells");
100
+ const mergeCellsEnd = xml.indexOf("</mergeCells>");
101
+ if (mergeCellsStart === -1 || mergeCellsEnd === -1) {
102
+ return createError("Invalid mergeCells structure");
103
+ }
104
+ const mergeCellsContent = xml.substring(mergeCellsStart, mergeCellsEnd);
105
+ const countMatch = mergeCellsContent.match(/count="(\d+)"/);
106
+ if (!countMatch) {
107
+ return createError("Count attribute not specified for mergeCells");
108
+ }
109
+ const mergeCellTags = mergeCellsContent.match(/<mergeCell\s+ref="([A-Z]+\d+:[A-Z]+\d+)"\s*\/>/g);
110
+ if (!mergeCellTags) {
111
+ return createError("No merged cells found");
112
+ }
113
+ // Check if the number of mergeCells matches the count attribute
114
+ if (mergeCellTags.length !== parseInt(countMatch[1])) {
115
+ return createError("Mismatch in the number of merged cells", `Expected: ${countMatch[1]}, found: ${mergeCellTags.length}`);
116
+ }
117
+ // Check for duplicates of mergeCell
118
+ const mergeRefs = new Set();
119
+ const duplicates = new Set();
120
+ for (const mergeTag of mergeCellTags) {
121
+ const refMatch = mergeTag.match(/ref="([A-Z]+\d+:[A-Z]+\d+)"/);
122
+ if (!refMatch) {
123
+ return createError("Invalid merge cell format", `Tag: ${mergeTag}`);
124
+ }
125
+ const ref = refMatch[1];
126
+ if (mergeRefs.has(ref)) {
127
+ duplicates.add(ref);
128
+ }
129
+ else {
130
+ mergeRefs.add(ref);
131
+ }
129
132
  }
130
- else {
131
- mergeRefs.add(ref);
133
+ if (duplicates.size > 0) {
134
+ return createError("Duplicates of merged cells found", `Duplicates: ${Array.from(duplicates).join(", ")}`);
135
+ }
136
+ // Check for overlapping merge ranges
137
+ const mergedRanges = Array.from(mergeRefs).map(ref => {
138
+ const [start, end] = ref.split(":");
139
+ return {
140
+ endCol: end.match(/[A-Z]+/)?.[0] || "",
141
+ endRow: parseInt(end.match(/\d+/)?.[0] || "0"),
142
+ startCol: start.match(/[A-Z]+/)?.[0] || "",
143
+ startRow: parseInt(start.match(/\d+/)?.[0] || "0"),
144
+ };
145
+ });
146
+ for (let i = 0; i < mergedRanges.length; i++) {
147
+ for (let j = i + 1; j < mergedRanges.length; j++) {
148
+ const a = mergedRanges[i];
149
+ const b = mergedRanges[j];
150
+ if (rangesIntersect(a, b)) {
151
+ return createError("Found intersecting merged cells", `Intersecting: ${getRangeString(a)} and ${getRangeString(b)}`);
152
+ }
153
+ }
132
154
  }
133
- }
134
- if (duplicates.size > 0) {
135
- return createError("Duplicates of merged cells found", `Duplicates: ${Array.from(duplicates).join(", ")}`);
136
- }
137
- // Check for overlapping merge ranges
138
- const mergedRanges = Array.from(mergeRefs).map(ref => {
139
- const [start, end] = ref.split(":");
140
- return {
141
- endCol: end.match(/[A-Z]+/)?.[0] || "",
142
- endRow: parseInt(end.match(/\d+/)?.[0] || "0"),
143
- startCol: start.match(/[A-Z]+/)?.[0] || "",
144
- startRow: parseInt(start.match(/\d+/)?.[0] || "0"),
145
- };
146
- });
147
- for (let i = 0; i < mergedRanges.length; i++) {
148
- for (let j = i + 1; j < mergedRanges.length; j++) {
149
- const a = mergedRanges[i];
150
- const b = mergedRanges[j];
151
- if (rangesIntersect(a, b)) {
152
- return createError("Found intersecting merged cells", `Intersecting: ${getRangeString(a)} and ${getRangeString(b)}`);
155
+ // 6. Additional check: all mergeCell tags refer to existing cells
156
+ for (const mergeTag of mergeCellTags) {
157
+ const refMatch = mergeTag.match(/ref="([A-Z]+\d+:[A-Z]+\d+)"/);
158
+ if (!refMatch) {
159
+ return createError("Invalid merge cell format", `Tag: ${mergeTag}`);
160
+ }
161
+ const [cell1, cell2] = refMatch[1].split(":");
162
+ const cell1Col = cell1.match(/[A-Z]+/)?.[0];
163
+ const cell1Row = parseInt(cell1.match(/\d+/)?.[0] || "0");
164
+ const cell2Col = cell2.match(/[A-Z]+/)?.[0];
165
+ const cell2Row = parseInt(cell2.match(/\d+/)?.[0] || "0");
166
+ if (!cell1Col || !cell2Col || isNaN(cell1Row) || isNaN(cell2Row)) {
167
+ return createError("Invalid merged cell coordinates", `Merged cells: ${refMatch[1]}`);
168
+ }
169
+ // Check if the merged cells exist
170
+ const cell1Exists = allCells.some(c => c.row === cell1Row && c.col === cell1Col);
171
+ const cell2Exists = allCells.some(c => c.row === cell2Row && c.col === cell2Col);
172
+ if (!cell1Exists || !cell2Exists) {
173
+ return createError("Merged cell reference points to non-existent cells", `Merged cells: ${refMatch[1]}, missing: ${!cell1Exists ? `${cell1Col}${cell1Row}` : `${cell2Col}${cell2Row}`}`);
153
174
  }
154
175
  }
155
176
  }
@@ -178,27 +199,6 @@ export function validateWorksheetXml(xml) {
178
199
  return createError("Cell is outside the specified area (by column)", `Cell: ${cell.col}${cell.row}, dimension: ${dimensionMatch[1]}`);
179
200
  }
180
201
  }
181
- // 6. Additional check: all mergeCell tags refer to existing cells
182
- for (const mergeTag of mergeCellTags) {
183
- const refMatch = mergeTag.match(/ref="([A-Z]+\d+:[A-Z]+\d+)"/);
184
- if (!refMatch) {
185
- return createError("Invalid merge cell format", `Tag: ${mergeTag}`);
186
- }
187
- const [cell1, cell2] = refMatch[1].split(":");
188
- const cell1Col = cell1.match(/[A-Z]+/)?.[0];
189
- const cell1Row = parseInt(cell1.match(/\d+/)?.[0] || "0");
190
- const cell2Col = cell2.match(/[A-Z]+/)?.[0];
191
- const cell2Row = parseInt(cell2.match(/\d+/)?.[0] || "0");
192
- if (!cell1Col || !cell2Col || isNaN(cell1Row) || isNaN(cell2Row)) {
193
- return createError("Invalid merged cell coordinates", `Merged cells: ${refMatch[1]}`);
194
- }
195
- // Check if the merged cells exist
196
- const cell1Exists = allCells.some(c => c.row === cell1Row && c.col === cell1Col);
197
- const cell2Exists = allCells.some(c => c.row === cell2Row && c.col === cell2Col);
198
- if (!cell1Exists || !cell2Exists) {
199
- return createError("Merged cell reference points to non-existent cells", `Merged cells: ${refMatch[1]}, missing: ${!cell1Exists ? `${cell1Col}${cell1Row}` : `${cell2Col}${cell2Row}`}`);
200
- }
201
- }
202
202
  return { isValid: true };
203
203
  }
204
204
  // A function to check if two ranges intersect
@@ -10,34 +10,74 @@ import { prepareRowToCells } from "./prepare-row-to-cells.js";
10
10
  * for the first row written to the file. Subsequent rows are written
11
11
  * with incrementing row numbers.
12
12
  *
13
- * @param output - A file write stream to write the Excel XML to.
14
- * @param rows - An async iterable of rows, where each row is an array
15
- * of values.
16
- * @param startRowNumber - The starting row number to use for the first
17
- * row written to the file.
18
- *
19
- * @returns An object with a single property `rowNumber`, which is the
20
- * last row number written to the file (i.e., the `startRowNumber`
21
- * plus the number of rows written).
13
+ * @param {WritableLike} output - A file write stream to write the Excel XML to.
14
+ * @param {AsyncIterable<unknown[] | unknown[][]>} rows - An async iterable of rows, where each row is an array
15
+ * of values or an array of arrays of values.
16
+ * @param {number} startRowNumber - The starting row number to use for the first
17
+ * row written to the file.
18
+ * @returns {Promise<{
19
+ * dimension: {
20
+ * maxColumn: string;
21
+ * maxRow: number;
22
+ * minColumn: string;
23
+ * minRow: number;
24
+ * };
25
+ * rowNumber: number;
26
+ * }>} An object containing:
27
+ * - dimension: The boundaries of the written data (min/max columns and rows)
28
+ * - rowNumber: The last row number written to the file
22
29
  */
23
30
  export async function writeRowsToStream(output, rows, startRowNumber) {
24
31
  let rowNumber = startRowNumber;
32
+ const dimension = {
33
+ maxColumn: "A",
34
+ maxRow: startRowNumber,
35
+ minColumn: "A",
36
+ minRow: startRowNumber,
37
+ };
38
+ // Функция для сравнения колонок (A < B, AA > Z и т.д.)
39
+ const compareColumns = (a, b) => {
40
+ if (a === b)
41
+ return 0;
42
+ return a.length === b.length ? (a < b ? -1 : 1) : (a.length < b.length ? -1 : 1);
43
+ };
44
+ const processRow = (row, currentRowNumber) => {
45
+ const cells = prepareRowToCells(row, currentRowNumber);
46
+ if (cells.length === 0)
47
+ return;
48
+ output.write(`<row r="${currentRowNumber}">${cells.map(cell => cell.cellXml).join("")}</row>`);
49
+ // Обновление границ
50
+ const firstCellRef = cells[0]?.cellRef;
51
+ const lastCellRef = cells[cells.length - 1]?.cellRef;
52
+ if (firstCellRef) {
53
+ const colLetters = firstCellRef.match(/[A-Z]+/)?.[0] || "";
54
+ if (compareColumns(colLetters, dimension.minColumn) < 0) {
55
+ dimension.minColumn = colLetters;
56
+ }
57
+ }
58
+ if (lastCellRef) {
59
+ const colLetters = lastCellRef.match(/[A-Z]+/)?.[0] || "";
60
+ if (compareColumns(colLetters, dimension.maxColumn) > 0) {
61
+ dimension.maxColumn = colLetters;
62
+ }
63
+ }
64
+ dimension.maxRow = currentRowNumber;
65
+ };
25
66
  for await (const row of rows) {
26
- // Transform the row into XML
67
+ if (!row.length)
68
+ continue;
27
69
  if (Array.isArray(row[0])) {
28
70
  for (const subRow of row) {
29
- const cells = prepareRowToCells(subRow, rowNumber);
30
- // Write the row to the file
31
- output.write(`<row r="${rowNumber}">${cells.join("")}</row>`);
71
+ if (!subRow.length)
72
+ continue;
73
+ processRow(subRow, rowNumber);
32
74
  rowNumber++;
33
75
  }
34
76
  }
35
77
  else {
36
- const cells = prepareRowToCells(row, rowNumber);
37
- // Write the row to the file
38
- output.write(`<row r="${rowNumber}">${cells.join("")}</row>`);
78
+ processRow(row, rowNumber);
39
79
  rowNumber++;
40
80
  }
41
81
  }
42
- return { rowNumber };
82
+ return { dimension, rowNumber };
43
83
  }
@@ -135,6 +135,7 @@ export declare class TemplateFs {
135
135
  * @param {Object} data - The data to create the template from.
136
136
  * @param {string} data.source - The path or buffer of the Excel file.
137
137
  * @param {string} data.destination - The path to save the template to.
138
+ * @param {boolean} data.isUniqueDestination - Whether to add a random UUID to the destination path.
138
139
  * @returns {Promise<Template>} A new Template instance.
139
140
  * @throws {Error} If reading or writing files fails.
140
141
  * @experimental This API is experimental and might change in future versions.
@@ -142,5 +143,6 @@ export declare class TemplateFs {
142
143
  static from(data: {
143
144
  destination: string;
144
145
  source: string | Buffer;
146
+ isUniqueDestination?: boolean;
145
147
  }): Promise<TemplateFs>;
146
148
  }
@@ -11,6 +11,13 @@ export declare class TemplateMemory {
11
11
  * @type {boolean}
12
12
  */
13
13
  destroyed: boolean;
14
+ /**
15
+ * Creates a Template instance from a map of file paths to buffers.
16
+ *
17
+ * @param {Object<string, Buffer>} files - The files to create the template from.
18
+ * @throws {Error} If reading or writing files fails.
19
+ * @experimental This API is experimental and might change in future versions.
20
+ */
14
21
  constructor(files: Record<string, Buffer>);
15
22
  /**
16
23
  * Copies a sheet from the template to a new name.
@@ -55,6 +62,20 @@ export declare class TemplateMemory {
55
62
  startRowNumber?: number;
56
63
  rows: unknown[][];
57
64
  }): Promise<void>;
65
+ /**
66
+ * Inserts rows into a specific sheet in the template using an async stream.
67
+ *
68
+ * @param {Object} data - The data for row insertion.
69
+ * @param {string} data.sheetName - The name of the sheet to insert rows into.
70
+ * @param {number} [data.startRowNumber] - The row number to start inserting from.
71
+ * @param {AsyncIterable<unknown[]>} data.rows - Async iterable of rows to insert.
72
+ * @returns {Promise<void>}
73
+ * @throws {Error} If the template instance has been destroyed.
74
+ * @throws {Error} If the sheet does not exist.
75
+ * @throws {Error} If the row number is out of range.
76
+ * @throws {Error} If a column is out of range.
77
+ * @experimental This API is experimental and might change in future versions.
78
+ */
58
79
  insertRowsStream(data: {
59
80
  sheetName: string;
60
81
  startRowNumber?: number;
@@ -79,6 +100,46 @@ export declare class TemplateMemory {
79
100
  * @experimental This API is experimental and might change in future versions.
80
101
  */
81
102
  set(key: string, content: Buffer): Promise<void>;
103
+ /**
104
+ * Merges sheets into a base sheet.
105
+ *
106
+ * @param {Object} data
107
+ * @param {{ sheetIndexes?: number[]; sheetNames?: string[] }} data.additions - The sheets to merge.
108
+ * @param {number} [data.baseSheetIndex=1] - The 1-based index of the sheet to merge into.
109
+ * @param {string} [data.baseSheetName] - The name of the sheet to merge into.
110
+ * @param {number} [data.gap=0] - The number of empty rows to insert between each added section.
111
+ * @returns {void}
112
+ */
113
+ mergeSheets(data: {
114
+ additions: {
115
+ sheetIndexes?: number[];
116
+ sheetNames?: string[];
117
+ };
118
+ baseSheetIndex?: number;
119
+ baseSheetName?: string;
120
+ gap?: number;
121
+ }): void;
122
+ /**
123
+ * Removes sheets from the workbook.
124
+ *
125
+ * @param {Object} data
126
+ * @param {number[]} [data.sheetIndexes] - The 1-based indexes of the sheets to remove.
127
+ * @param {string[]} [data.sheetNames] - The names of the sheets to remove.
128
+ * @returns {void}
129
+ */
130
+ removeSheets(data: {
131
+ sheetNames?: string[];
132
+ sheetIndexes?: number[];
133
+ }): void;
134
+ /**
135
+ * Creates a Template instance from an Excel file source.
136
+ *
137
+ * @param {Object} data - The data to create the template from.
138
+ * @param {string | Buffer} data.source - The path or buffer of the Excel file.
139
+ * @returns {Promise<TemplateMemory>} A new Template instance.
140
+ * @throws {Error} If reading the file fails.
141
+ * @experimental This API is experimental and might change in future versions.
142
+ */
82
143
  static from(data: {
83
144
  source: string | Buffer;
84
145
  }): Promise<TemplateMemory>;
@@ -1,3 +1,4 @@
1
+ export * as Common from "../../utils/index.js";
1
2
  export * from "./apply-replacements.js";
2
3
  export * from "./check-row.js";
3
4
  export * from "./check-rows.js";
@@ -14,6 +15,7 @@ export * from "./process-merge-cells.js";
14
15
  export * from "./process-merge-finalize.js";
15
16
  export * from "./process-rows.js";
16
17
  export * from "./process-shared-strings.js";
18
+ export * from "./regexp.js";
17
19
  export * from "./to-excel-column-object.js";
18
20
  export * from "./update-dimension.js";
19
21
  export * from "./validate-worksheet-xml.js";
@@ -1 +1,5 @@
1
- export declare function prepareRowToCells(row: unknown[], rowNumber: number): string[];
1
+ export declare function prepareRowToCells(row: unknown[], rowNumber: number): {
2
+ cellRef: string;
3
+ cellValue: string;
4
+ cellXml: string;
5
+ }[];
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Creates a regular expression to match a relationship element with a specific ID.
3
+ *
4
+ * @param {string} id - The relationship ID to match (e.g. "rId1")
5
+ * @returns {RegExp} A regular expression that matches a Relationship XML element with the given ID and captures the Target attribute value
6
+ * @example
7
+ * const regex = relationshipMatch("rId1");
8
+ * const xml = '<Relationship Id="rId1" Target="worksheets/sheet1.xml"/>';
9
+ * const match = xml.match(regex);
10
+ * // match[1] === "worksheets/sheet1.xml"
11
+ */
12
+ export declare function relationshipMatch(id: string): RegExp;
13
+ /**
14
+ * Creates a regular expression to match a sheet element with a specific name.
15
+ *
16
+ * @param {string} sheetName - The name of the sheet to match
17
+ * @returns {RegExp} A regular expression that matches a sheet XML element with the given name and captures the r:id attribute value
18
+ * @example
19
+ * const regex = sheetMatch("Sheet1");
20
+ * const xml = '<sheet name="Sheet1" sheetId="1" r:id="rId1"/>';
21
+ * const match = xml.match(regex);
22
+ * // match[1] === "rId1"
23
+ */
24
+ export declare function sheetMatch(sheetName: string): RegExp;
@@ -1 +1,16 @@
1
+ /**
2
+ * Updates the dimension element in an Excel worksheet XML string based on the actual cell references.
3
+ *
4
+ * This function scans the XML for all cell references and calculates the minimum and maximum
5
+ * column/row values to determine the actual used range in the worksheet. It then updates
6
+ * the dimension element to reflect this range.
7
+ *
8
+ * @param {string} xml - The worksheet XML string to process
9
+ * @returns {string} The XML string with updated dimension element
10
+ * @example
11
+ * // XML with cells from A1 to C3
12
+ * const xml = '....<dimension ref="A1:B2"/>.....<c r="C3">...</c>...';
13
+ * const updated = updateDimension(xml);
14
+ * // Returns XML with dimension updated to ref="A1:C3"
15
+ */
1
16
  export declare function updateDimension(xml: string): string;
@@ -13,17 +13,30 @@ interface WritableLike {
13
13
  * for the first row written to the file. Subsequent rows are written
14
14
  * with incrementing row numbers.
15
15
  *
16
- * @param output - A file write stream to write the Excel XML to.
17
- * @param rows - An async iterable of rows, where each row is an array
18
- * of values.
19
- * @param startRowNumber - The starting row number to use for the first
20
- * row written to the file.
21
- *
22
- * @returns An object with a single property `rowNumber`, which is the
23
- * last row number written to the file (i.e., the `startRowNumber`
24
- * plus the number of rows written).
16
+ * @param {WritableLike} output - A file write stream to write the Excel XML to.
17
+ * @param {AsyncIterable<unknown[] | unknown[][]>} rows - An async iterable of rows, where each row is an array
18
+ * of values or an array of arrays of values.
19
+ * @param {number} startRowNumber - The starting row number to use for the first
20
+ * row written to the file.
21
+ * @returns {Promise<{
22
+ * dimension: {
23
+ * maxColumn: string;
24
+ * maxRow: number;
25
+ * minColumn: string;
26
+ * minRow: number;
27
+ * };
28
+ * rowNumber: number;
29
+ * }>} An object containing:
30
+ * - dimension: The boundaries of the written data (min/max columns and rows)
31
+ * - rowNumber: The last row number written to the file
25
32
  */
26
33
  export declare function writeRowsToStream(output: WritableLike, rows: AsyncIterable<unknown[] | unknown[][]>, startRowNumber: number): Promise<{
34
+ dimension: {
35
+ maxColumn: string;
36
+ maxRow: number;
37
+ minColumn: string;
38
+ minRow: number;
39
+ };
27
40
  rowNumber: number;
28
41
  }>;
29
42
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@js-ak/excel-toolbox",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "excel-toolbox",
5
5
  "publishConfig": {
6
6
  "access": "public",