@js-ak/excel-toolbox 1.4.0 → 1.4.1
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/build/cjs/lib/template/template-fs.js +4 -223
- package/build/cjs/lib/template/utils/extract-xml-declaration.js +1 -1
- package/build/cjs/lib/template/utils/get-max-row-number.js +1 -1
- package/build/cjs/lib/template/utils/index.js +4 -0
- package/build/cjs/lib/template/utils/process-merge-cells.js +40 -0
- package/build/cjs/lib/template/utils/process-merge-finalize.js +51 -0
- package/build/cjs/lib/template/utils/process-rows.js +160 -0
- package/build/cjs/lib/template/utils/process-shared-strings.js +45 -0
- package/build/cjs/lib/template/utils/to-excel-column-object.js +2 -10
- package/build/cjs/lib/template/utils/validate-worksheet-xml.js +65 -51
- package/build/cjs/lib/template/utils/write-rows-to-stream.js +2 -1
- package/build/esm/lib/template/template-fs.js +4 -223
- package/build/esm/lib/template/utils/extract-xml-declaration.js +1 -1
- package/build/esm/lib/template/utils/get-max-row-number.js +1 -1
- package/build/esm/lib/template/utils/index.js +4 -0
- package/build/esm/lib/template/utils/process-merge-cells.js +37 -0
- package/build/esm/lib/template/utils/process-merge-finalize.js +48 -0
- package/build/esm/lib/template/utils/process-rows.js +157 -0
- package/build/esm/lib/template/utils/process-shared-strings.js +42 -0
- package/build/esm/lib/template/utils/to-excel-column-object.js +2 -10
- package/build/esm/lib/template/utils/validate-worksheet-xml.js +65 -51
- package/build/esm/lib/template/utils/write-rows-to-stream.js +2 -1
- package/build/types/lib/template/utils/index.d.ts +4 -0
- package/build/types/lib/template/utils/process-merge-cells.d.ts +20 -0
- package/build/types/lib/template/utils/process-merge-finalize.d.ts +38 -0
- package/build/types/lib/template/utils/process-rows.d.ts +31 -0
- package/build/types/lib/template/utils/process-shared-strings.d.ts +20 -0
- package/build/types/lib/template/utils/validate-worksheet-xml.d.ts +16 -0
- package/package.json +1 -1
@@ -5,5 +5,21 @@ interface ValidationResult {
|
|
5
5
|
details?: string;
|
6
6
|
};
|
7
7
|
}
|
8
|
+
/**
|
9
|
+
* Validates an Excel worksheet XML against the expected structure and rules.
|
10
|
+
*
|
11
|
+
* Checks the following:
|
12
|
+
* 1. XML starts with <?xml declaration
|
13
|
+
* 2. Root element is worksheet
|
14
|
+
* 3. Required elements are present
|
15
|
+
* 4. row numbers are in ascending order
|
16
|
+
* 5. No duplicate row numbers
|
17
|
+
* 6. No overlapping merge ranges
|
18
|
+
* 7. All cells are within the specified dimension
|
19
|
+
* 8. All mergeCell tags refer to existing cells
|
20
|
+
*
|
21
|
+
* @param xml The raw XML content of the worksheet
|
22
|
+
* @returns A ValidationResult object indicating if the XML is valid, and an error message if it's not
|
23
|
+
*/
|
8
24
|
export declare function validateWorksheetXml(xml: string): ValidationResult;
|
9
25
|
export {};
|