@univerjs/sheets 1.4.0 → 1.5.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/README.md +21 -5
- package/lib/cjs/facade.js +223 -13
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/{plugin-BbO0p0x9.js → plugin-BS0W2CXX.js} +159 -59
- package/lib/cjs/worker.js +1 -1
- package/lib/es/facade.js +233 -23
- package/lib/es/index.js +1 -1
- package/lib/es/{plugin-ipfwehrC.js → plugin-DSoshIDg.js} +163 -63
- package/lib/es/worker.js +1 -1
- package/lib/facade.js +233 -23
- package/lib/index.js +1 -1
- package/lib/{plugin-ipfwehrC.js → plugin-DSoshIDg.js} +163 -63
- package/lib/types/facade/f-range.d.ts +146 -1
- package/lib/types/facade/f-worksheet.d.ts +76 -2
- package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +10 -1
- package/lib/types/services/ref-range/util.d.ts +16 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/lib/worker.js +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
## Package Overview
|
|
10
10
|
|
|
11
|
-
| Package | UMD global | CSS | Locales | Facade entry |
|
|
12
|
-
| --- | --- | :---: | :---: | :---: |
|
|
13
|
-
| `@univerjs/sheets` | `UniverSheets` | No | Yes | Yes |
|
|
11
|
+
| Package | UMD global | CSS | Locales | Facade entry | Worker entry |
|
|
12
|
+
| --- | --- | :---: | :---: | :---: | :---: |
|
|
13
|
+
| `@univerjs/sheets` | `UniverSheets` | No | Yes | Yes | Yes |
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -20,10 +20,10 @@ pnpm add @univerjs/sheets
|
|
|
20
20
|
npm install @univerjs/sheets
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Keep all `@univerjs/*` packages on the same version.
|
|
24
|
-
|
|
25
23
|
## Usage
|
|
26
24
|
|
|
25
|
+
Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
|
|
26
|
+
|
|
27
27
|
```ts
|
|
28
28
|
import EnUS from '@univerjs/sheets/locale/en-US';
|
|
29
29
|
import { UniverSheetsPlugin } from '@univerjs/sheets';
|
|
@@ -33,6 +33,22 @@ univer.registerPlugin(UniverSheetsPlugin);
|
|
|
33
33
|
// Merge EnUS into your Univer locale map when this package contributes UI text.
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### Worker usage
|
|
37
|
+
|
|
38
|
+
On the main thread, import `UniverSheetsPlugin` from `@univerjs/sheets`. Set `notExecuteFormula: true` to delegate calculation to the worker.
|
|
39
|
+
|
|
40
|
+
In the worker entry, import `UniverSheetsPlugin` from `@univerjs/sheets/worker`:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { UniverSheetsPlugin } from '@univerjs/sheets/worker';
|
|
44
|
+
|
|
45
|
+
univer.registerPlugin(UniverSheetsPlugin, { onlyRegisterFormulaRelatedMutations: true });
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Integration Notes
|
|
49
|
+
|
|
50
|
+
- Import `@univerjs/sheets/facade` when using this package through Univer Facade APIs.
|
|
51
|
+
|
|
36
52
|
## Resources
|
|
37
53
|
|
|
38
54
|
- [Documentation](https://docs.univer.ai)
|
package/lib/cjs/facade.js
CHANGED
|
@@ -23,7 +23,7 @@ let _univerjs_protocol = require("@univerjs/protocol");
|
|
|
23
23
|
*/
|
|
24
24
|
const SHEETS_CUSTOM_FIELD_WARNING_MESSAGE = "[Facade]: The sheets custom field is not recommended for external use. Use it at your own risk.";
|
|
25
25
|
|
|
26
|
-
// \0@oxc-project+runtime@0.
|
|
26
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
|
|
27
27
|
function _typeof(o) {
|
|
28
28
|
"@babel/helpers - typeof";
|
|
29
29
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -33,25 +33,25 @@ function _typeof(o) {
|
|
|
33
33
|
}, _typeof(o);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// \0@oxc-project+runtime@0.
|
|
37
|
-
function toPrimitive(t,
|
|
36
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
|
|
37
|
+
function toPrimitive(t, e) {
|
|
38
38
|
if ("object" != _typeof(t) || !t) return t;
|
|
39
|
-
var
|
|
40
|
-
if (void 0 !==
|
|
41
|
-
var i =
|
|
39
|
+
var r;
|
|
40
|
+
if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
|
|
41
|
+
var i = r.call(t, e || "default");
|
|
42
42
|
if ("object" != _typeof(i)) return i;
|
|
43
43
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
44
44
|
}
|
|
45
|
-
return ("string" ===
|
|
45
|
+
return ("string" === e ? String : Number)(t);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// \0@oxc-project+runtime@0.
|
|
48
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
|
|
49
49
|
function toPropertyKey(t) {
|
|
50
50
|
var i = toPrimitive(t, "string");
|
|
51
51
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// \0@oxc-project+runtime@0.
|
|
54
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
|
|
55
55
|
function _defineProperty(e, r, t) {
|
|
56
56
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
57
57
|
value: t,
|
|
@@ -61,14 +61,14 @@ function _defineProperty(e, r, t) {
|
|
|
61
61
|
}) : e[r] = t, e;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// \0@oxc-project+runtime@0.
|
|
64
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorateParam.js
|
|
65
65
|
function __decorateParam(paramIndex, decorator) {
|
|
66
66
|
return function(target, key) {
|
|
67
67
|
decorator(target, key, paramIndex);
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
// \0@oxc-project+runtime@0.
|
|
71
|
+
// \0@oxc-project+runtime@0.157.0/helpers/esm/decorate.js
|
|
72
72
|
function __decorate(decorators, target, key, desc) {
|
|
73
73
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
74
74
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2278,7 +2278,6 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2278
2278
|
...parsedRange,
|
|
2279
2279
|
unitId: this._workbook.getUnitId(),
|
|
2280
2280
|
sheetId: sheet.getSheetId(),
|
|
2281
|
-
rangeType: _univerjs_core.RANGE_TYPE.NORMAL,
|
|
2282
2281
|
startRow: parsedRange.rangeType === _univerjs_core.RANGE_TYPE.COLUMN ? 0 : parsedRange.startRow,
|
|
2283
2282
|
endRow: parsedRange.rangeType === _univerjs_core.RANGE_TYPE.COLUMN ? sheet.getMaxRows() - 1 : parsedRange.endRow,
|
|
2284
2283
|
startColumn: parsedRange.rangeType === _univerjs_core.RANGE_TYPE.ROW ? 0 : parsedRange.startColumn,
|
|
@@ -2327,6 +2326,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2327
2326
|
}
|
|
2328
2327
|
/**
|
|
2329
2328
|
* Inserts a row after the given row position.
|
|
2329
|
+
*
|
|
2330
|
+
* To insert multiple rows, prefer {@link FWorksheet.insertRowsAfter} with the full count
|
|
2331
|
+
* instead of repeatedly calling this method.
|
|
2332
|
+
*
|
|
2330
2333
|
* @param {number} afterPosition - The existing row after which the new row should be added. The index is zero-based and must be between 0 and `getMaxRows() - 1`.
|
|
2331
2334
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
2332
2335
|
* @example
|
|
@@ -2344,6 +2347,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2344
2347
|
}
|
|
2345
2348
|
/**
|
|
2346
2349
|
* Inserts a row before the given row position.
|
|
2350
|
+
*
|
|
2351
|
+
* To insert multiple rows, prefer {@link FWorksheet.insertRowsBefore} with the full count
|
|
2352
|
+
* instead of repeatedly calling this method.
|
|
2353
|
+
*
|
|
2347
2354
|
* @param {number} beforePosition - The existing row before which the new row should be added. The index is zero-based and must be between 0 and `getMaxRows() - 1`.
|
|
2348
2355
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
2349
2356
|
* @example
|
|
@@ -2361,6 +2368,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2361
2368
|
}
|
|
2362
2369
|
/**
|
|
2363
2370
|
* Inserts one or more consecutive blank rows in a sheet starting at the specified location.
|
|
2371
|
+
*
|
|
2372
|
+
* For multiple consecutive rows, pass the full `numRows` in one call instead of looping
|
|
2373
|
+
* with the default count of one.
|
|
2374
|
+
*
|
|
2364
2375
|
* @param {number} rowIndex - The existing row before which rows are inserted. The index is zero-based and must be between 0 and `getMaxRows() - 1`.
|
|
2365
2376
|
* @param {number} [numRows] - The positive number of rows to insert.
|
|
2366
2377
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
@@ -2458,6 +2469,11 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2458
2469
|
}
|
|
2459
2470
|
/**
|
|
2460
2471
|
* Deletes the row at the given row position.
|
|
2472
|
+
*
|
|
2473
|
+
* For consecutive rows, prefer {@link FWorksheet.deleteRows} with the full count. For
|
|
2474
|
+
* non-contiguous rows, use {@link FWorksheet.deleteRowsByPoints} so shifting indices are handled
|
|
2475
|
+
* without a manual loop over this method.
|
|
2476
|
+
*
|
|
2461
2477
|
* @param {number} rowPosition - The position of the row, starting at 0 for the first row.
|
|
2462
2478
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
2463
2479
|
* @example
|
|
@@ -2559,6 +2575,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2559
2575
|
}
|
|
2560
2576
|
/**
|
|
2561
2577
|
* Hides the rows in the given range.
|
|
2578
|
+
*
|
|
2579
|
+
* For multiple rows, pass an FRange spanning all target rows in one call. If you already have
|
|
2580
|
+
* a starting index and count, use {@link FWorksheet.hideRows} instead of calling this method for each row.
|
|
2581
|
+
*
|
|
2562
2582
|
* @param {FRange} row - The row range to hide.
|
|
2563
2583
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
2564
2584
|
* @example
|
|
@@ -2586,6 +2606,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2586
2606
|
}
|
|
2587
2607
|
/**
|
|
2588
2608
|
* Hides one or more consecutive rows starting at the given index. Use 0-index for this method
|
|
2609
|
+
*
|
|
2610
|
+
* For multiple consecutive rows, pass the full `numRow` in one call instead of looping
|
|
2611
|
+
* with the default count of one.
|
|
2612
|
+
*
|
|
2589
2613
|
* @param {number} rowIndex - The starting index of the rows to hide
|
|
2590
2614
|
* @param {number} [numRow] - The number of rows to hide
|
|
2591
2615
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
@@ -2618,6 +2642,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2618
2642
|
}
|
|
2619
2643
|
/**
|
|
2620
2644
|
* Make the row in the given range visible.
|
|
2645
|
+
*
|
|
2646
|
+
* For multiple rows, pass an FRange spanning all target rows in one call. If you already have
|
|
2647
|
+
* a starting index and count, use {@link FWorksheet.showRows} instead of calling this method for each row.
|
|
2648
|
+
*
|
|
2621
2649
|
* @param {FRange} row - The range to unhide, if hidden.
|
|
2622
2650
|
* @returns {FWorksheet} This sheet, for chaining.
|
|
2623
2651
|
* @example
|
|
@@ -2645,6 +2673,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2645
2673
|
}
|
|
2646
2674
|
/**
|
|
2647
2675
|
* Unhides one or more consecutive rows starting at the given zero-based index.
|
|
2676
|
+
*
|
|
2677
|
+
* For multiple consecutive rows, pass the full `numRows` in one call instead of looping
|
|
2678
|
+
* with the default count of one.
|
|
2679
|
+
*
|
|
2648
2680
|
* @param {number} rowIndex - The starting index of the rows
|
|
2649
2681
|
* @param {number} [numRows] - The number of rows
|
|
2650
2682
|
* @returns {FWorksheet} This worksheet instance for chaining
|
|
@@ -2677,6 +2709,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2677
2709
|
}
|
|
2678
2710
|
/**
|
|
2679
2711
|
* Sets the row height of the given row in pixels. By default, rows grow to fit cell contents. If you want to force rows to a specified height, use setRowHeightsForced(startRow, numRows, height).
|
|
2712
|
+
*
|
|
2713
|
+
* For the same height across consecutive rows, prefer {@link FWorksheet.setRowHeights} with the full
|
|
2714
|
+
* row count instead of calling this method for each row.
|
|
2715
|
+
*
|
|
2680
2716
|
* @param {number} rowPosition - The row position to change.
|
|
2681
2717
|
* @param {number} height - The height in pixels to set it to.
|
|
2682
2718
|
* @returns {FWorksheet} This worksheet instance for chaining
|
|
@@ -2904,6 +2940,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2904
2940
|
}
|
|
2905
2941
|
/**
|
|
2906
2942
|
* Inserts a column after the given column position.
|
|
2943
|
+
*
|
|
2944
|
+
* To insert multiple columns, prefer {@link FWorksheet.insertColumnsAfter} with the full count
|
|
2945
|
+
* instead of repeatedly calling this method.
|
|
2946
|
+
*
|
|
2907
2947
|
* @param {number} afterPosition - The column after which the new column should be added, starting at 0 for the first column
|
|
2908
2948
|
* @returns {FWorksheet} This worksheet instance for chaining
|
|
2909
2949
|
* @example
|
|
@@ -2921,6 +2961,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2921
2961
|
}
|
|
2922
2962
|
/**
|
|
2923
2963
|
* Inserts a column before the given column position.
|
|
2964
|
+
*
|
|
2965
|
+
* To insert multiple columns, prefer {@link FWorksheet.insertColumnsBefore} with the full count
|
|
2966
|
+
* instead of repeatedly calling this method.
|
|
2967
|
+
*
|
|
2924
2968
|
* @param {number} beforePosition - The column before which the new column should be added, starting at 0 for the first column
|
|
2925
2969
|
* @returns {FWorksheet} This worksheet instance for chaining
|
|
2926
2970
|
* @example
|
|
@@ -2938,6 +2982,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
2938
2982
|
}
|
|
2939
2983
|
/**
|
|
2940
2984
|
* Inserts one or more consecutive blank columns in a sheet starting at the specified location.
|
|
2985
|
+
*
|
|
2986
|
+
* For multiple consecutive columns, pass the full `numColumns` in one call instead of looping
|
|
2987
|
+
* with the default count of one.
|
|
2988
|
+
*
|
|
2941
2989
|
* @param {number} columnIndex - The index indicating where to insert a column, starting at 0 for the first column
|
|
2942
2990
|
* @param {number} [numColumns] - The number of columns to insert
|
|
2943
2991
|
* @returns {FWorksheet} This sheet, for chaining
|
|
@@ -3032,6 +3080,11 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3032
3080
|
}
|
|
3033
3081
|
/**
|
|
3034
3082
|
* Deletes the column at the given column position.
|
|
3083
|
+
*
|
|
3084
|
+
* For consecutive columns, prefer {@link FWorksheet.deleteColumns} with the full count. For
|
|
3085
|
+
* non-contiguous columns, use {@link FWorksheet.deleteColumnsByPoints} so shifting indices are handled
|
|
3086
|
+
* without a manual loop over this method.
|
|
3087
|
+
*
|
|
3035
3088
|
* @param {number} columnPosition - The position of the column, starting at 0 for the first column
|
|
3036
3089
|
* @returns {FWorksheet} This sheet, for chaining
|
|
3037
3090
|
* @example
|
|
@@ -3133,6 +3186,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3133
3186
|
}
|
|
3134
3187
|
/**
|
|
3135
3188
|
* Hides the column or columns in the given range.
|
|
3189
|
+
*
|
|
3190
|
+
* For multiple columns, pass an FRange spanning all target columns in one call. If you already have
|
|
3191
|
+
* a starting index and count, use {@link FWorksheet.hideColumns} instead of calling this method for each column.
|
|
3192
|
+
*
|
|
3136
3193
|
* @param {FRange} column - The column range to hide
|
|
3137
3194
|
* @returns {FWorksheet} This sheet, for chaining
|
|
3138
3195
|
* @example
|
|
@@ -3160,6 +3217,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3160
3217
|
}
|
|
3161
3218
|
/**
|
|
3162
3219
|
* Hides one or more consecutive columns starting at the given index. Use 0-index for this method
|
|
3220
|
+
*
|
|
3221
|
+
* For multiple consecutive columns, pass the full `numColumn` in one call instead of looping
|
|
3222
|
+
* with the default count of one.
|
|
3223
|
+
*
|
|
3163
3224
|
* @param {number} columnIndex - The starting index of the columns to hide
|
|
3164
3225
|
* @param {number} [numColumn] - The number of columns to hide
|
|
3165
3226
|
* @returns {FWorksheet} This sheet, for chaining
|
|
@@ -3192,6 +3253,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3192
3253
|
}
|
|
3193
3254
|
/**
|
|
3194
3255
|
* Show the column in the given range.
|
|
3256
|
+
*
|
|
3257
|
+
* For multiple columns, pass an FRange spanning all target columns in one call. If you already have
|
|
3258
|
+
* a starting index and count, use {@link FWorksheet.showColumns} instead of calling this method for each column.
|
|
3259
|
+
*
|
|
3195
3260
|
* @param {FRange} column - The range to unhide, if hidden
|
|
3196
3261
|
* @returns {FWorksheet} This sheet, for chaining
|
|
3197
3262
|
* @example
|
|
@@ -3219,6 +3284,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3219
3284
|
}
|
|
3220
3285
|
/**
|
|
3221
3286
|
* Show one or more consecutive columns starting at the given index. Use 0-index for this method
|
|
3287
|
+
*
|
|
3288
|
+
* For multiple consecutive columns, pass the full `numColumns` in one call instead of looping
|
|
3289
|
+
* with the default count of one.
|
|
3290
|
+
*
|
|
3222
3291
|
* @param {number} columnIndex - The starting index of the columns to unhide
|
|
3223
3292
|
* @param {number} [numColumns] - The number of columns to unhide
|
|
3224
3293
|
* @returns {FWorksheet} This sheet, for chaining
|
|
@@ -3251,6 +3320,10 @@ let FWorksheet = _FWorksheet = class FWorksheet extends _univerjs_core_facade.FB
|
|
|
3251
3320
|
}
|
|
3252
3321
|
/**
|
|
3253
3322
|
* Sets the width of the given column in pixels.
|
|
3323
|
+
*
|
|
3324
|
+
* For the same width across consecutive columns, prefer {@link FWorksheet.setColumnWidths} with the
|
|
3325
|
+
* full column count instead of calling this method for each column.
|
|
3326
|
+
*
|
|
3254
3327
|
* @param {number} columnPosition - The position of the given column to set
|
|
3255
3328
|
* @param {number} width - The width in pixels to set it to
|
|
3256
3329
|
* @returns {FWorksheet} This sheet, for chaining
|
|
@@ -4690,6 +4763,9 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
4690
4763
|
/**
|
|
4691
4764
|
* Return first cell style in this range.
|
|
4692
4765
|
*
|
|
4766
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
4767
|
+
* {@link FRange.getCellStyles} once instead of calling this method for each cell.
|
|
4768
|
+
*
|
|
4693
4769
|
* @param {GetStyleType} [type] - The type of the style to get. 'row' means get the composed style of row, col and
|
|
4694
4770
|
* default worksheet style. 'col' means get the composed style of col, row and default worksheet style.
|
|
4695
4771
|
* 'cell' means get the style of cell without merging row style, col style and default worksheet style.
|
|
@@ -4741,6 +4817,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
4741
4817
|
}
|
|
4742
4818
|
/**
|
|
4743
4819
|
* Returns the raw value of the top-left cell in the range. Empty cells return `null`.
|
|
4820
|
+
*
|
|
4821
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
4822
|
+
* {@link FRange.getRawValues} once instead of calling this method for each cell.
|
|
4823
|
+
*
|
|
4744
4824
|
* @returns {Nullable<CellValue>} The raw value of the cell. Returns `null` if the cell is empty.
|
|
4745
4825
|
* @example
|
|
4746
4826
|
* ```ts
|
|
@@ -4765,6 +4845,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
4765
4845
|
}
|
|
4766
4846
|
/**
|
|
4767
4847
|
* Returns the displayed value of the top-left cell in the range. The value is a String. Empty cells return an empty string.
|
|
4848
|
+
*
|
|
4849
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
4850
|
+
* {@link FRange.getDisplayValues} once instead of calling this method for each cell.
|
|
4851
|
+
*
|
|
4768
4852
|
* @returns {string} The displayed value of the cell. Returns an empty string if the cell is empty.
|
|
4769
4853
|
* @example
|
|
4770
4854
|
* ```ts
|
|
@@ -4918,6 +5002,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
4918
5002
|
}
|
|
4919
5003
|
/**
|
|
4920
5004
|
* Return first cell model data in this range
|
|
5005
|
+
*
|
|
5006
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5007
|
+
* {@link FRange.getCellDataGrid} once instead of calling this method for each cell.
|
|
5008
|
+
*
|
|
4921
5009
|
* @returns {ICellData | null} The cell model data
|
|
4922
5010
|
* @example
|
|
4923
5011
|
* ```ts
|
|
@@ -5039,6 +5127,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5039
5127
|
}
|
|
5040
5128
|
/**
|
|
5041
5129
|
* Returns the formula (A1 notation) of the top-left cell in the range, or an empty string if the cell is empty or doesn't contain a formula.
|
|
5130
|
+
*
|
|
5131
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5132
|
+
* {@link FRange.getFormulas} once instead of calling this method for each cell.
|
|
5133
|
+
*
|
|
5042
5134
|
* @returns {string} The formula for the cell.
|
|
5043
5135
|
* @example
|
|
5044
5136
|
* ```ts
|
|
@@ -5081,6 +5173,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5081
5173
|
}
|
|
5082
5174
|
/**
|
|
5083
5175
|
* Gets whether text wrapping is enabled for top-left cell in the range.
|
|
5176
|
+
*
|
|
5177
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5178
|
+
* {@link FRange.getWraps} once instead of calling this method for each cell.
|
|
5179
|
+
*
|
|
5084
5180
|
* @returns {boolean} whether text wrapping is enabled for the cell.
|
|
5085
5181
|
* @example
|
|
5086
5182
|
* ```ts
|
|
@@ -5141,6 +5237,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5141
5237
|
/**
|
|
5142
5238
|
* Returns the horizontal alignment of the top-left cell as `left`, `center`, or `normal` (right alignment).
|
|
5143
5239
|
* Default and other core alignment values return `general`, which is not accepted by `setHorizontalAlignment()`.
|
|
5240
|
+
*
|
|
5241
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5242
|
+
* {@link FRange.getHorizontalAlignments} once instead of calling this method for each cell.
|
|
5243
|
+
*
|
|
5144
5244
|
* @returns {string} The horizontal alignment of the text in the cell.
|
|
5145
5245
|
* @example
|
|
5146
5246
|
* ```ts
|
|
@@ -5174,6 +5274,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5174
5274
|
/**
|
|
5175
5275
|
* Returns `top`, `middle`, or `bottom` for the top-left cell; unspecified alignment returns `general`.
|
|
5176
5276
|
* `general` is a getter result and is not accepted by `setVerticalAlignment()`.
|
|
5277
|
+
*
|
|
5278
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5279
|
+
* {@link FRange.getVerticalAlignments} once instead of calling this method for each cell.
|
|
5280
|
+
*
|
|
5177
5281
|
* @returns {string} The vertical alignment of the text in the cell.
|
|
5178
5282
|
* @example
|
|
5179
5283
|
* ```ts
|
|
@@ -5204,7 +5308,12 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5204
5308
|
return this._worksheet.getRange(this._range).getVerticalAlignments().map((row) => row.map((alignment) => transformCoreVerticalAlignment(alignment)));
|
|
5205
5309
|
}
|
|
5206
5310
|
/**
|
|
5207
|
-
* Set custom
|
|
5311
|
+
* Set the same custom metadata for every cell in the current range.
|
|
5312
|
+
*
|
|
5313
|
+
* For the same metadata across multiple cells, call this method once on the entire target range.
|
|
5314
|
+
* For different metadata per cell, prefer {@link FRange.setCustomMetaDatas} with a two-dimensional
|
|
5315
|
+
* array matching the range dimensions instead of calling this method for each cell.
|
|
5316
|
+
*
|
|
5208
5317
|
* @param {CustomData} data The custom meta data
|
|
5209
5318
|
* @returns {FRange} This range, for chaining
|
|
5210
5319
|
* @example
|
|
@@ -5258,6 +5367,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5258
5367
|
}
|
|
5259
5368
|
/**
|
|
5260
5369
|
* Returns the custom meta data for the cell at the start of this range.
|
|
5370
|
+
*
|
|
5371
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5372
|
+
* {@link FRange.getCustomMetaDatas} once instead of calling this method for each cell.
|
|
5373
|
+
*
|
|
5261
5374
|
* @returns {CustomData | null} The custom meta data
|
|
5262
5375
|
* @example
|
|
5263
5376
|
* ```ts
|
|
@@ -5291,6 +5404,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5291
5404
|
}
|
|
5292
5405
|
/**
|
|
5293
5406
|
* Sets basic border properties for the current range.
|
|
5407
|
+
*
|
|
5408
|
+
* For borders on multiple cells, call this method once on the full target range. Border types such as
|
|
5409
|
+
* outer and inner are relative to that range, so applying them to each cell can produce different borders.
|
|
5410
|
+
*
|
|
5294
5411
|
* @param {BorderType} type The type of border to apply
|
|
5295
5412
|
* @param {BorderStyleTypes} style The border style
|
|
5296
5413
|
* @param {string} [color] Optional border color in CSS notation
|
|
@@ -5319,6 +5436,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5319
5436
|
}
|
|
5320
5437
|
/**
|
|
5321
5438
|
* Returns the background color of the top-left cell in the range.
|
|
5439
|
+
*
|
|
5440
|
+
* For multiple cells, create the target range with {@link FWorksheet.getRange} and call
|
|
5441
|
+
* {@link FRange.getBackgrounds} once instead of calling this method for each cell.
|
|
5442
|
+
*
|
|
5322
5443
|
* @returns {string} The color code of the background.
|
|
5323
5444
|
* @example
|
|
5324
5445
|
* ```ts
|
|
@@ -5354,6 +5475,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5354
5475
|
}
|
|
5355
5476
|
/**
|
|
5356
5477
|
* Set background color for current range.
|
|
5478
|
+
*
|
|
5479
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5480
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5481
|
+
*
|
|
5357
5482
|
* @param {string} color The background color
|
|
5358
5483
|
* @returns {FRange} This range, for chaining
|
|
5359
5484
|
* @example
|
|
@@ -5379,6 +5504,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5379
5504
|
}
|
|
5380
5505
|
/**
|
|
5381
5506
|
* Set background color for current range.
|
|
5507
|
+
*
|
|
5508
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5509
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5510
|
+
*
|
|
5382
5511
|
* @param {string} color The background color
|
|
5383
5512
|
* @returns {FRange} This range, for chaining
|
|
5384
5513
|
* @example
|
|
@@ -5396,6 +5525,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5396
5525
|
}
|
|
5397
5526
|
/**
|
|
5398
5527
|
* Set rotation for text in current range.
|
|
5528
|
+
*
|
|
5529
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5530
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5531
|
+
*
|
|
5399
5532
|
* @param {number} rotation - The rotation angle in degrees
|
|
5400
5533
|
* @returns This range, for chaining
|
|
5401
5534
|
* @example
|
|
@@ -5419,6 +5552,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5419
5552
|
/**
|
|
5420
5553
|
* Sets the value or specified cell properties for every cell in this range.
|
|
5421
5554
|
*
|
|
5555
|
+
* For the same value or cell-data update across multiple cells, call this method once on the entire
|
|
5556
|
+
* target range. For different values or updates per cell, prefer {@link FRange.setValues} with a
|
|
5557
|
+
* two-dimensional array or sparse matrix instead of calling this method for each cell.
|
|
5558
|
+
*
|
|
5422
5559
|
* There are two input modes:
|
|
5423
5560
|
*
|
|
5424
5561
|
* - `CellValue` (`number`, `string`, or `boolean`): replaces the cell content. A string starting
|
|
@@ -5484,6 +5621,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5484
5621
|
/**
|
|
5485
5622
|
* Sets the value or specified cell properties of the top-left cell in this range.
|
|
5486
5623
|
* Uses the same scalar parsing and cell-data update rules as {@link FRange.setValue}.
|
|
5624
|
+
*
|
|
5625
|
+
* For multiple cells, prefer {@link FRange.setValues} on the target range with a two-dimensional array
|
|
5626
|
+
* or sparse matrix. To apply the same value to the entire range, use {@link FRange.setValue} once.
|
|
5627
|
+
*
|
|
5487
5628
|
* @param {CellValue | ICellData} value The scalar content or cell-data update to apply to the top-left cell only.
|
|
5488
5629
|
* @returns {FRange} This range, for chaining
|
|
5489
5630
|
* @example
|
|
@@ -5516,6 +5657,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5516
5657
|
}
|
|
5517
5658
|
/**
|
|
5518
5659
|
* Set the rich text value for the cell at the start of this range.
|
|
5660
|
+
*
|
|
5661
|
+
* For multiple cells, prefer {@link FRange.setRichTextValues} on the target range with a two-dimensional
|
|
5662
|
+
* array matching its dimensions instead of calling this method for each cell.
|
|
5663
|
+
*
|
|
5519
5664
|
* @param {RichTextValue | IDocumentData} value The rich text value
|
|
5520
5665
|
* @returns {FRange} The range
|
|
5521
5666
|
* @example
|
|
@@ -5591,6 +5736,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5591
5736
|
* Set the cell wrap of the given range.
|
|
5592
5737
|
* Pass `true` to set `WrapStrategy.WRAP`, or `false` to reset to `WrapStrategy.UNSPECIFIED`.
|
|
5593
5738
|
* Use `setWrapStrategy()` to explicitly select clipping or overflow behavior.
|
|
5739
|
+
*
|
|
5740
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5741
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5742
|
+
*
|
|
5594
5743
|
* @param {boolean} isWrapEnabled Whether to enable wrap
|
|
5595
5744
|
* @returns {FRange} this range, for chaining
|
|
5596
5745
|
* @example
|
|
@@ -5614,6 +5763,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5614
5763
|
}
|
|
5615
5764
|
/**
|
|
5616
5765
|
* Sets whether cells shrink their font size to fit the cell width.
|
|
5766
|
+
*
|
|
5767
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5768
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5769
|
+
*
|
|
5617
5770
|
* @param {boolean} enabled Whether to enable shrink-to-fit for this range.
|
|
5618
5771
|
* @returns {FRange} This range, for chaining.
|
|
5619
5772
|
* @example
|
|
@@ -5632,6 +5785,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5632
5785
|
}
|
|
5633
5786
|
/**
|
|
5634
5787
|
* Sets the text wrapping strategy for the cells in the range.
|
|
5788
|
+
*
|
|
5789
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5790
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5791
|
+
*
|
|
5635
5792
|
* @param {WrapStrategy} strategy The text wrapping strategy
|
|
5636
5793
|
* @returns {FRange} this range, for chaining
|
|
5637
5794
|
* @example
|
|
@@ -5655,6 +5812,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5655
5812
|
}
|
|
5656
5813
|
/**
|
|
5657
5814
|
* Set the vertical (top to bottom) alignment for the given range (top/middle/bottom).
|
|
5815
|
+
*
|
|
5816
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5817
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5818
|
+
*
|
|
5658
5819
|
* @param {FVerticalAlignment} alignment The vertical alignment
|
|
5659
5820
|
* @returns {FRange} this range, for chaining
|
|
5660
5821
|
* @example
|
|
@@ -5678,6 +5839,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5678
5839
|
/**
|
|
5679
5840
|
* Sets the horizontal alignment for the range using `left`, `center`, or `normal`.
|
|
5680
5841
|
* These parameter names follow Google Apps Script. In Univer, `normal` means right alignment; `right` is not accepted.
|
|
5842
|
+
*
|
|
5843
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5844
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5845
|
+
*
|
|
5681
5846
|
* @param {FHorizontalAlignment} alignment The horizontal alignment: `left`, `center`, or `normal` (right alignment).
|
|
5682
5847
|
* @returns {FRange} this range, for chaining
|
|
5683
5848
|
* @example
|
|
@@ -5702,6 +5867,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5702
5867
|
* Sets cell values or specified cell properties using an array or a sparse matrix.
|
|
5703
5868
|
* Each entry follows the scalar parsing and cell-data update rules of {@link FRange.setValue}.
|
|
5704
5869
|
*
|
|
5870
|
+
* For multiple cells, pass all values or cell-data updates in one call instead of calling this method
|
|
5871
|
+
* on individual cell ranges. Use a matching two-dimensional array for a rectangle, or a sparse matrix
|
|
5872
|
+
* with absolute worksheet coordinates for non-contiguous cells.
|
|
5873
|
+
*
|
|
5705
5874
|
* A two-dimensional array is relative to this range's top-left cell and must match its dimensions.
|
|
5706
5875
|
* A sparse matrix uses absolute, zero-based worksheet row and column keys. Only supplied entries
|
|
5707
5876
|
* are updated; matrix coordinates are not offset by or clipped to this range.
|
|
@@ -5737,6 +5906,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5737
5906
|
}
|
|
5738
5907
|
/**
|
|
5739
5908
|
* Sets the font weight for the given range (normal/bold),
|
|
5909
|
+
*
|
|
5910
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5911
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5912
|
+
*
|
|
5740
5913
|
* @param {FontWeight|null} fontWeight The font weight, either 'normal' or 'bold'; a null value resets the font weight.
|
|
5741
5914
|
* @returns {FRange} This range, for chaining
|
|
5742
5915
|
* @example
|
|
@@ -5769,6 +5942,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5769
5942
|
}
|
|
5770
5943
|
/**
|
|
5771
5944
|
* Sets the font style for the given range ('italic' or 'normal').
|
|
5945
|
+
*
|
|
5946
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5947
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5948
|
+
*
|
|
5772
5949
|
* @param {FontStyle|null} fontStyle The font style, either 'italic' or 'normal'; a null value resets the font style.
|
|
5773
5950
|
* @returns {FRange} This range, for chaining
|
|
5774
5951
|
* @example
|
|
@@ -5801,6 +5978,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5801
5978
|
}
|
|
5802
5979
|
/**
|
|
5803
5980
|
* Sets the font line style of the given range ('underline', 'line-through', or 'none').
|
|
5981
|
+
*
|
|
5982
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
5983
|
+
* and call this method once instead of calling it on each cell separately.
|
|
5984
|
+
*
|
|
5804
5985
|
* @param {FontLine|null} fontLine The font line style, either 'underline', 'line-through', or 'none'; a null value resets the font line style.
|
|
5805
5986
|
* @returns {FRange} This range, for chaining
|
|
5806
5987
|
* @example
|
|
@@ -5862,6 +6043,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5862
6043
|
}
|
|
5863
6044
|
/**
|
|
5864
6045
|
* Sets the font family, such as "Arial" or "Helvetica".
|
|
6046
|
+
*
|
|
6047
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
6048
|
+
* and call this method once instead of calling it on each cell separately.
|
|
6049
|
+
*
|
|
5865
6050
|
* @param {string|null} fontFamily The font family to set; a null value resets the font family.
|
|
5866
6051
|
* @returns {FRange} This range, for chaining
|
|
5867
6052
|
* @example
|
|
@@ -5889,6 +6074,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5889
6074
|
}
|
|
5890
6075
|
/**
|
|
5891
6076
|
* Sets the font size, with the size being the point size to use.
|
|
6077
|
+
*
|
|
6078
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
6079
|
+
* and call this method once instead of calling it on each cell separately.
|
|
6080
|
+
*
|
|
5892
6081
|
* @param {number|null} size A font size in point size. A null value resets the font size.
|
|
5893
6082
|
* @returns {FRange} This range, for chaining
|
|
5894
6083
|
* @example
|
|
@@ -5916,6 +6105,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
5916
6105
|
}
|
|
5917
6106
|
/**
|
|
5918
6107
|
* Sets the font color in CSS notation (such as '#ffffff' or 'white').
|
|
6108
|
+
*
|
|
6109
|
+
* To apply the same setting to multiple cells, create the full target range with {@link FWorksheet.getRange}
|
|
6110
|
+
* and call this method once instead of calling it on each cell separately.
|
|
6111
|
+
*
|
|
5919
6112
|
* @param {string|null} color The font color in CSS notation (such as '#ffffff' or 'white'); a null value resets the color.
|
|
5920
6113
|
* @returns {FRange} This range, for chaining
|
|
5921
6114
|
* @example
|
|
@@ -6335,6 +6528,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
6335
6528
|
/**
|
|
6336
6529
|
* Clears the range content and formatting, or only one of them as specified by the options.
|
|
6337
6530
|
* Both content and formatting are cleared when both flags are true or both are false.
|
|
6531
|
+
*
|
|
6532
|
+
* To clear multiple cells, create the full target range with {@link FWorksheet.getRange} and call this
|
|
6533
|
+
* method once instead of clearing each cell separately.
|
|
6534
|
+
*
|
|
6338
6535
|
* @param {IFacadeClearOptions} [options] - Options for clearing the range. If not provided, the contents and formatting are cleared both.
|
|
6339
6536
|
* @param {boolean} [options.contentsOnly] - If true, the contents of the range are cleared. Effective only when `formatOnly` is false. Defaults to false.
|
|
6340
6537
|
* @param {boolean} [options.formatOnly] - Clears only formatting when true and `contentsOnly` is false. Defaults to false.
|
|
@@ -6366,6 +6563,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
6366
6563
|
}
|
|
6367
6564
|
/**
|
|
6368
6565
|
* Clears content of the range, while preserving formatting information.
|
|
6566
|
+
*
|
|
6567
|
+
* To clear multiple cells, create the full target range with {@link FWorksheet.getRange} and call this
|
|
6568
|
+
* method once instead of clearing each cell separately.
|
|
6569
|
+
*
|
|
6369
6570
|
* @returns {FRange} This range, for chaining.
|
|
6370
6571
|
* @example
|
|
6371
6572
|
* ```typescript
|
|
@@ -6388,6 +6589,10 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
6388
6589
|
}
|
|
6389
6590
|
/**
|
|
6390
6591
|
* Clears formatting information of the range, while preserving contents.
|
|
6592
|
+
*
|
|
6593
|
+
* To clear multiple cells, create the full target range with {@link FWorksheet.getRange} and call this
|
|
6594
|
+
* method once instead of clearing each cell separately.
|
|
6595
|
+
*
|
|
6391
6596
|
* @returns {FRange} This range, for chaining.
|
|
6392
6597
|
* @example
|
|
6393
6598
|
* ```typescript
|
|
@@ -6671,6 +6876,11 @@ let FRange = _FRange = class FRange extends _univerjs_core_facade.FBaseInitialab
|
|
|
6671
6876
|
}
|
|
6672
6877
|
/**
|
|
6673
6878
|
* Updates the formula for this range. The given formula must be in A1 notation.
|
|
6879
|
+
*
|
|
6880
|
+
* For the same formula string across multiple cells, call this method once on the entire target range.
|
|
6881
|
+
* For different formulas per cell, prefer {@link FRange.setFormulas} with a two-dimensional array
|
|
6882
|
+
* matching the range dimensions instead of calling this method for each cell.
|
|
6883
|
+
*
|
|
6674
6884
|
* @param {string} formula - A string representing the formula to set for the cell.
|
|
6675
6885
|
* @returns {FRange} This range instance for chaining.
|
|
6676
6886
|
* @example
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_plugin = require("./plugin-
|
|
2
|
+
const require_plugin = require("./plugin-BS0W2CXX.js");
|
|
3
3
|
let _univerjs_core = require("@univerjs/core");
|
|
4
4
|
let _univerjs_engine_formula = require("@univerjs/engine-formula");
|
|
5
5
|
let _univerjs_engine_render = require("@univerjs/engine-render");
|