@univerjs-pro/exchange-node 1.6.2 → 1.7.0-alpha.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.
- package/README.md +10 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -119,7 +119,9 @@ This option requires an Office native binding that supports `deferPivotCalculati
|
|
|
119
119
|
|
|
120
120
|
### XLSX worksheet default styles
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
An imported style applied to a trailing range of columns through XFD is retained in the snapshot even when only that range references it. When the worksheet default matches the workbook Normal font and the range has no individual column settings, export preserves it as a single range. If an older snapshot lost the referenced style definition, re-import the original XLSX to recover it.
|
|
123
|
+
|
|
124
|
+
XLSX has no worksheet-level equivalent of Univer's `sheet.defaultStyle`. The Office native exporter passes the complete default-style object, or the object resolved from its workbook style ID, through the same style conversion used for cells. Column defaults and the necessary composed row/cell styles preserve supported font properties, RGB text and fill colors, borders, number formats, alignment, wrapping, shrink-to-fit, rotation, text direction and left indent. The projection does not filter the input to a list of font fields. Unspecified attributes retain the existing workbook export base; column, row and cell attributes override the default by property, including explicit `0` and `null` clearing values. This also applies to `FWorksheet.setDefaultStyle()` followed by `workbook.save()` and to complete snapshot exports. The exporter uses the Univer Sheets default font (Arial 11 pt) for the workbook Normal style. When every imported grid sheet explicitly specifies the same font family and size in its XLSX worksheet metadata, that font is retained as Normal. Different worksheet fonts are exported within their respective sheets. Earlier native versions could select the font from `R0` or another cell style and apply it to unformatted cells and row and column headings. To set a font for a worksheet, use `sheet.defaultStyle` or `setDefaultStyle()`. Existing snapshots with explicit sheet or cell fonts can be exported again with the updated native binding.
|
|
123
125
|
|
|
124
126
|
Previously, worksheet defaults such as a changed font or a default fill could be silently lost on export. The corrected native binding preserves the supported effective styles, including blank cells within the worksheet's `columnCount`. Existing cells and explicit column metadata beyond that count are also covered, up to XLSX limits. Columns outside that range and subsequently inserted columns follow Excel's formatting rules; there is no persistent sheet-default inheritance rule in XLSX. Export does not mutate the supplied data. Re-import can represent the defaults using column/cell styles, so `getDefaultStyle()` and snapshot style IDs need not equal their pre-export values. Explicit false bold/italic flags are retained on import, General horizontal alignment can appear as `ht: null` to clear inherited alignment, and font superscript/subscript is read back. These shared conversion corrections also apply to ordinary cell/row/column styles. Applications asserting identical snapshot structure should compare effective styles instead. Default-style colors now use the same validation as cell styles; an invalid CSS color fails export instead of being silently discarded.
|
|
125
127
|
|
|
@@ -302,6 +304,13 @@ See [Embedded Office attachments](../../docs/ole-attachments.md) for supported p
|
|
|
302
304
|
|
|
303
305
|
Office conversion supports Sheet and Base import from XLS, XLSX, CSV, and TSV; Doc import from DOC and DOCX; and Slide import from PPT and PPTX. Export supports XLSX, CSV, TSV, DOCX, and PPTX for their corresponding unit types. Board exports PPTX from the root entry; Mermaid imports Board through `/mermaid`. PDF import/export uses the optional `/pdf` entry described below.
|
|
304
306
|
|
|
307
|
+
With an Office native binding that supports Base Gantt export, each Gantt view adds a worksheet named after the view. Its visible data columns appear on the left. The timeline groups daily date cells under left-aligned Monday dates and fills scheduled intervals in the view's task colors. Header borders separate the weeks and days. A light gray background marks weekend columns behind the task bars. Dates and weekday names use the Base locale, falling back to Excel's regional settings when the locale is missing or unrecognized. Plan comparison adds a gray planned interval beneath each task. Configured progress and predecessor fields produce editable Excel progress markers and curved connectors. Parent RecordLinks become expandable Excel row groups that include each child's planned interval. Re-export the original Base to regenerate the worksheet.
|
|
308
|
+
|
|
309
|
+
Base Gantt date filters and conditional colors use the exporting host's local time zone. All views in an export evaluate relative dates against the same day.
|
|
310
|
+
Gantt text sorts use the host's default locale. For language-specific ordering, match this locale to the one used by the Base client.
|
|
311
|
+
|
|
312
|
+
For Base XLSX exports, the Office native binding calculates convertible formulas from the records in the supplied snapshot. The data sheets and Gantt views share the results, including formulas that depend on another table. With `formulaPolicy: 'values'`, the exporter writes the calculated value, falling back to the saved value for an unconvertible formula. With `'text'`, it writes the formula text. Re-export with the updated native binding to refresh existing workbooks.
|
|
313
|
+
|
|
305
314
|
Office native packages are published for Linux x64 GNU, Linux arm64 GNU, Windows x64 MSVC, and macOS x64/arm64.
|
|
306
315
|
|
|
307
316
|
## License and monthly export quota
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@univerjs-pro/boards": "1.
|
|
5
|
-
"@univerjs-pro/collaboration": "1.
|
|
6
|
-
"@univerjs-pro/exchange-node-binding": "~1.
|
|
7
|
-
"@univerjs-pro/pdfs": "1.
|
|
8
|
-
"@univerjs-pro/slides": "1.
|
|
9
|
-
"@univerjs/core": "1.
|
|
10
|
-
"@univerjs/protocol": "1.
|
|
4
|
+
"@univerjs-pro/boards": "1.7.0-alpha.0",
|
|
5
|
+
"@univerjs-pro/collaboration": "1.7.0-alpha.0",
|
|
6
|
+
"@univerjs-pro/exchange-node-binding": "~1.4.0-alpha.0",
|
|
7
|
+
"@univerjs-pro/pdfs": "1.7.0-alpha.0",
|
|
8
|
+
"@univerjs-pro/slides": "1.7.0-alpha.0",
|
|
9
|
+
"@univerjs/core": "1.7.0-alpha.0",
|
|
10
|
+
"@univerjs/protocol": "1.7.0-alpha.0"
|
|
11
11
|
},
|
|
12
12
|
"description": "Node.js SDK for converting between Office formats, Univer unit data, and snapshots",
|
|
13
13
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"./lib/cjs/mermaid.cjs"
|
|
33
33
|
],
|
|
34
34
|
"type": "module",
|
|
35
|
-
"version": "1.
|
|
35
|
+
"version": "1.7.0-alpha.0",
|
|
36
36
|
"main": "./lib/cjs/index.cjs",
|
|
37
37
|
"module": "./lib/es/index.js",
|
|
38
38
|
"types": "./lib/types/index.d.ts",
|