@univerjs/sheets-conditional-formatting 0.24.0 → 0.25.0-insiders.20260608-e4336f7
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/lib/cjs/facade.js +142 -73
- package/lib/cjs/index.js +263 -166
- package/lib/cjs/locale/ar-SA.js +11 -0
- package/lib/cjs/locale/ca-ES.js +11 -0
- package/lib/cjs/locale/de-DE.js +11 -0
- package/lib/cjs/locale/en-US.js +26 -0
- package/lib/cjs/locale/es-ES.js +11 -0
- package/lib/cjs/locale/fa-IR.js +11 -0
- package/lib/cjs/locale/fr-FR.js +11 -0
- package/lib/cjs/locale/id-ID.js +11 -0
- package/lib/cjs/locale/it-IT.js +11 -0
- package/lib/cjs/locale/ja-JP.js +11 -0
- package/lib/cjs/locale/ko-KR.js +11 -0
- package/lib/cjs/locale/pl-PL.js +11 -0
- package/lib/cjs/locale/pt-BR.js +11 -0
- package/lib/cjs/locale/ru-RU.js +11 -0
- package/lib/cjs/locale/sk-SK.js +11 -0
- package/lib/cjs/locale/vi-VN.js +11 -0
- package/lib/cjs/locale/zh-CN.js +11 -0
- package/lib/cjs/locale/zh-HK.js +11 -0
- package/lib/cjs/locale/zh-TW.js +11 -0
- package/lib/es/facade.js +142 -73
- package/lib/es/index.js +252 -168
- package/lib/es/locale/ar-SA.js +10 -0
- package/lib/es/locale/ca-ES.js +10 -0
- package/lib/es/locale/de-DE.js +10 -0
- package/lib/es/locale/en-US.js +25 -0
- package/lib/es/locale/es-ES.js +10 -0
- package/lib/es/locale/fa-IR.js +10 -0
- package/lib/es/locale/fr-FR.js +10 -0
- package/lib/es/locale/id-ID.js +10 -0
- package/lib/es/locale/it-IT.js +10 -0
- package/lib/es/locale/ja-JP.js +10 -0
- package/lib/es/locale/ko-KR.js +10 -0
- package/lib/es/locale/pl-PL.js +10 -0
- package/lib/es/locale/pt-BR.js +10 -0
- package/lib/es/locale/ru-RU.js +10 -0
- package/lib/es/locale/sk-SK.js +10 -0
- package/lib/es/locale/vi-VN.js +10 -0
- package/lib/es/locale/zh-CN.js +10 -0
- package/lib/es/locale/zh-HK.js +10 -0
- package/lib/es/locale/zh-TW.js +10 -0
- package/lib/facade.js +142 -73
- package/lib/index.js +252 -168
- package/lib/locale/ar-SA.js +10 -0
- package/lib/locale/ca-ES.js +10 -0
- package/lib/locale/de-DE.js +10 -0
- package/lib/locale/en-US.js +25 -0
- package/lib/locale/es-ES.js +10 -0
- package/lib/locale/fa-IR.js +10 -0
- package/lib/locale/fr-FR.js +10 -0
- package/lib/locale/id-ID.js +10 -0
- package/lib/locale/it-IT.js +10 -0
- package/lib/locale/ja-JP.js +10 -0
- package/lib/locale/ko-KR.js +10 -0
- package/lib/locale/pl-PL.js +10 -0
- package/lib/locale/pt-BR.js +10 -0
- package/lib/locale/ru-RU.js +10 -0
- package/lib/locale/sk-SK.js +10 -0
- package/lib/locale/vi-VN.js +10 -0
- package/lib/locale/zh-CN.js +10 -0
- package/lib/locale/zh-HK.js +10 -0
- package/lib/locale/zh-TW.js +10 -0
- package/lib/types/facade/f-conditional-formatting-builder.d.ts +138 -69
- package/lib/types/facade/f-range.d.ts +6 -3
- package/lib/types/facade/f-worksheet.d.ts +14 -7
- package/lib/types/index.d.ts +3 -0
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/ca-ES.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +26 -0
- package/lib/types/locale/es-ES.d.ts +18 -0
- package/lib/types/locale/fa-IR.d.ts +18 -0
- package/lib/types/locale/fr-FR.d.ts +18 -0
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/ja-JP.d.ts +18 -0
- package/lib/types/locale/ko-KR.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/ru-RU.d.ts +18 -0
- package/lib/types/locale/sk-SK.d.ts +18 -0
- package/lib/types/locale/vi-VN.d.ts +18 -0
- package/lib/types/locale/zh-CN.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/locale/zh-TW.d.ts +18 -0
- package/lib/types/models/conditional-formatting-range-index-model.d.ts +32 -0
- package/lib/types/models/conditional-formatting-view-model.d.ts +3 -2
- package/lib/types/services/conditional-formatting-range-transform.service.d.ts +27 -0
- package/lib/types/services/conditional-formatting-style-composer.service.d.ts +31 -0
- package/lib/types/services/conditional-formatting.service.d.ts +7 -7
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +14 -9
- package/LICENSE +0 -176
|
@@ -32,7 +32,8 @@ declare class ConditionalFormatRuleBaseBuilder {
|
|
|
32
32
|
* @example
|
|
33
33
|
* ```typescript
|
|
34
34
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
35
|
-
* const fWorksheet = fWorkbook.
|
|
35
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
36
|
+
* if (!fWorksheet) return;
|
|
36
37
|
*
|
|
37
38
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
38
39
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -51,7 +52,8 @@ declare class ConditionalFormatRuleBaseBuilder {
|
|
|
51
52
|
* @example
|
|
52
53
|
* ```typescript
|
|
53
54
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
54
|
-
* const fWorksheet = fWorkbook.
|
|
55
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
56
|
+
* if (!fWorksheet) return;
|
|
55
57
|
*
|
|
56
58
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
57
59
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -92,7 +94,8 @@ declare class ConditionalFormatRuleBaseBuilder {
|
|
|
92
94
|
* @example
|
|
93
95
|
* ```typescript
|
|
94
96
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
95
|
-
* const fWorksheet = fWorkbook.
|
|
97
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
98
|
+
* if (!fWorksheet) return;
|
|
96
99
|
*
|
|
97
100
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
98
101
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -117,7 +120,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
117
120
|
* @example
|
|
118
121
|
* ```typescript
|
|
119
122
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
120
|
-
* const fWorksheet = fWorkbook.
|
|
123
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
124
|
+
* if (!fWorksheet) return;
|
|
121
125
|
*
|
|
122
126
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
123
127
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -143,7 +147,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
143
147
|
* @example
|
|
144
148
|
* ```typescript
|
|
145
149
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
146
|
-
* const fWorksheet = fWorkbook.
|
|
150
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
151
|
+
* if (!fWorksheet) return;
|
|
147
152
|
*
|
|
148
153
|
* // Create a conditional formatting rule that highlights cells with greater than average values in red for the range A1:D10.
|
|
149
154
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -162,7 +167,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
162
167
|
* @example
|
|
163
168
|
* ```typescript
|
|
164
169
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
165
|
-
* const fWorksheet = fWorkbook.
|
|
170
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
171
|
+
* if (!fWorksheet) return;
|
|
166
172
|
*
|
|
167
173
|
* // Create a conditional formatting rule that highlights cells with unique values in red for the range A1:D10.
|
|
168
174
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -181,7 +187,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
181
187
|
* @example
|
|
182
188
|
* ```typescript
|
|
183
189
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
184
|
-
* const fWorksheet = fWorkbook.
|
|
190
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
191
|
+
* if (!fWorksheet) return;
|
|
185
192
|
*
|
|
186
193
|
* // Create a conditional formatting rule that highlights cells with duplicate values in red for the range A1:D10.
|
|
187
194
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -204,7 +211,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
204
211
|
* @example
|
|
205
212
|
* ```typescript
|
|
206
213
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
207
|
-
* const fWorksheet = fWorkbook.
|
|
214
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
215
|
+
* if (!fWorksheet) return;
|
|
208
216
|
*
|
|
209
217
|
* // Create a conditional formatting rule that highlights the bottom 10% of values in red for the range A1:D10.
|
|
210
218
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -228,7 +236,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
228
236
|
* @example
|
|
229
237
|
* ```typescript
|
|
230
238
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
231
|
-
* const fWorksheet = fWorkbook.
|
|
239
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
240
|
+
* if (!fWorksheet) return;
|
|
232
241
|
*
|
|
233
242
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
234
243
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -248,7 +257,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
248
257
|
* @example
|
|
249
258
|
* ```typescript
|
|
250
259
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
251
|
-
* const fWorksheet = fWorkbook.
|
|
260
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
261
|
+
* if (!fWorksheet) return;
|
|
252
262
|
*
|
|
253
263
|
* // Create a conditional formatting rule that bolds the text for cells with not empty content in the range A1:D10.
|
|
254
264
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -268,7 +278,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
268
278
|
* @example
|
|
269
279
|
* ```typescript
|
|
270
280
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
271
|
-
* const fWorksheet = fWorkbook.
|
|
281
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
282
|
+
* if (!fWorksheet) return;
|
|
272
283
|
*
|
|
273
284
|
* // Create a conditional formatting rule that changes the font color to red for cells with not empty content in the range A1:D10.
|
|
274
285
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -288,7 +299,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
288
299
|
* @example
|
|
289
300
|
* ```typescript
|
|
290
301
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
291
|
-
* const fWorksheet = fWorkbook.
|
|
302
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
303
|
+
* if (!fWorksheet) return;
|
|
292
304
|
*
|
|
293
305
|
* // Create a conditional formatting rule that italicizes the text for cells with not empty content in the range A1:D10.
|
|
294
306
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -308,7 +320,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
308
320
|
* @example
|
|
309
321
|
* ```typescript
|
|
310
322
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
311
|
-
* const fWorksheet = fWorkbook.
|
|
323
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
324
|
+
* if (!fWorksheet) return;
|
|
312
325
|
*
|
|
313
326
|
* // Create a conditional formatting rule that set text strikethrough for cells with not empty content in the range A1:D10.
|
|
314
327
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -328,7 +341,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
328
341
|
* @example
|
|
329
342
|
* ```typescript
|
|
330
343
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
331
|
-
* const fWorksheet = fWorkbook.
|
|
344
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
345
|
+
* if (!fWorksheet) return;
|
|
332
346
|
*
|
|
333
347
|
* // Create a conditional formatting rule that underlines the text for cells with not empty content in the range A1:D10.
|
|
334
348
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -347,7 +361,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
347
361
|
* @example
|
|
348
362
|
* ```typescript
|
|
349
363
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
350
|
-
* const fWorksheet = fWorkbook.
|
|
364
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
365
|
+
* if (!fWorksheet) return;
|
|
351
366
|
*
|
|
352
367
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
353
368
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -366,7 +381,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
366
381
|
* @example
|
|
367
382
|
* ```typescript
|
|
368
383
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
369
|
-
* const fWorksheet = fWorkbook.
|
|
384
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
385
|
+
* if (!fWorksheet) return;
|
|
370
386
|
*
|
|
371
387
|
* // Create a conditional formatting rule that changes the font color to red for cells with not empty content in the range A1:D10.
|
|
372
388
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -386,7 +402,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
386
402
|
* @example
|
|
387
403
|
* ```typescript
|
|
388
404
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
389
|
-
* const fWorksheet = fWorkbook.
|
|
405
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
406
|
+
* if (!fWorksheet) return;
|
|
390
407
|
*
|
|
391
408
|
* // Create a conditional formatting rule that highlights cells with dates in the last 7 days in red for the range A1:D10.
|
|
392
409
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -406,7 +423,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
406
423
|
* @example
|
|
407
424
|
* ```typescript
|
|
408
425
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
409
|
-
* const fWorksheet = fWorkbook.
|
|
426
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
427
|
+
* if (!fWorksheet) return;
|
|
410
428
|
*
|
|
411
429
|
* // Create a conditional formatting rule that highlights cells with values greater than 10 in red for the range A1:D10.
|
|
412
430
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -427,7 +445,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
427
445
|
* @example
|
|
428
446
|
* ```typescript
|
|
429
447
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
430
|
-
* const fWorksheet = fWorkbook.
|
|
448
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
449
|
+
* if (!fWorksheet) return;
|
|
431
450
|
*
|
|
432
451
|
* // Create a conditional formatting rule that highlights cells with values between 10 and 20 in red for the range A1:D10.
|
|
433
452
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -447,7 +466,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
447
466
|
* @example
|
|
448
467
|
* ```typescript
|
|
449
468
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
450
|
-
* const fWorksheet = fWorkbook.
|
|
469
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
470
|
+
* if (!fWorksheet) return;
|
|
451
471
|
*
|
|
452
472
|
* // Create a conditional formatting rule that highlights cells with values equal to 10 in red for the range A1:D10.
|
|
453
473
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -467,7 +487,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
467
487
|
* @example
|
|
468
488
|
* ```typescript
|
|
469
489
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
470
|
-
* const fWorksheet = fWorkbook.
|
|
490
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
491
|
+
* if (!fWorksheet) return;
|
|
471
492
|
*
|
|
472
493
|
* // Create a conditional formatting rule that highlights cells with values greater than 10 in red for the range A1:D10.
|
|
473
494
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -487,7 +508,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
487
508
|
* @example
|
|
488
509
|
* ```typescript
|
|
489
510
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
490
|
-
* const fWorksheet = fWorkbook.
|
|
511
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
512
|
+
* if (!fWorksheet) return;
|
|
491
513
|
*
|
|
492
514
|
* // Create a conditional formatting rule that highlights cells with values greater than or equal to 10 in red for the range A1:D10.
|
|
493
515
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -507,7 +529,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
507
529
|
* @example
|
|
508
530
|
* ```typescript
|
|
509
531
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
510
|
-
* const fWorksheet = fWorkbook.
|
|
532
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
533
|
+
* if (!fWorksheet) return;
|
|
511
534
|
*
|
|
512
535
|
* // Create a conditional formatting rule that highlights cells with values less than 10 in red for the range A1:D10.
|
|
513
536
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -527,7 +550,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
527
550
|
* @example
|
|
528
551
|
* ```typescript
|
|
529
552
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
530
|
-
* const fWorksheet = fWorkbook.
|
|
553
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
554
|
+
* if (!fWorksheet) return;
|
|
531
555
|
*
|
|
532
556
|
* // Create a conditional formatting rule that highlights cells with values less than or equal to 10 in red for the range A1:D10.
|
|
533
557
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -548,7 +572,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
548
572
|
* @example
|
|
549
573
|
* ```typescript
|
|
550
574
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
551
|
-
* const fWorksheet = fWorkbook.
|
|
575
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
576
|
+
* if (!fWorksheet) return;
|
|
552
577
|
*
|
|
553
578
|
* // Create a conditional formatting rule that highlights cells with values not between 10 and 20 in red for the range A1:D10.
|
|
554
579
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -568,7 +593,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
568
593
|
* @example
|
|
569
594
|
* ```typescript
|
|
570
595
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
571
|
-
* const fWorksheet = fWorkbook.
|
|
596
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
597
|
+
* if (!fWorksheet) return;
|
|
572
598
|
*
|
|
573
599
|
* // Create a conditional formatting rule that highlights cells with values not equal to 10 in red for the range A1:D10.
|
|
574
600
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -588,7 +614,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
588
614
|
* @example
|
|
589
615
|
* ```typescript
|
|
590
616
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
591
|
-
* const fWorksheet = fWorkbook.
|
|
617
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
618
|
+
* if (!fWorksheet) return;
|
|
592
619
|
*
|
|
593
620
|
* // Create a conditional formatting rule that highlights cells with text containing 'apple' in red for the range A1:D10.
|
|
594
621
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -608,7 +635,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
608
635
|
* @example
|
|
609
636
|
* ```typescript
|
|
610
637
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
611
|
-
* const fWorksheet = fWorkbook.
|
|
638
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
639
|
+
* if (!fWorksheet) return;
|
|
612
640
|
*
|
|
613
641
|
* // Create a conditional formatting rule that highlights cells with text not containing 'apple' in red for the range A1:D10.
|
|
614
642
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -628,7 +656,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
628
656
|
* @example
|
|
629
657
|
* ```typescript
|
|
630
658
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
631
|
-
* const fWorksheet = fWorkbook.
|
|
659
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
660
|
+
* if (!fWorksheet) return;
|
|
632
661
|
*
|
|
633
662
|
* // Create a conditional formatting rule that highlights cells with text ending with '.ai' in red for the range A1:D10.
|
|
634
663
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -648,7 +677,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
648
677
|
* @example
|
|
649
678
|
* ```typescript
|
|
650
679
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
651
|
-
* const fWorksheet = fWorkbook.
|
|
680
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
681
|
+
* if (!fWorksheet) return;
|
|
652
682
|
*
|
|
653
683
|
* // Create a conditional formatting rule that highlights cells with text equal to 'apple' in red for the range A1:D10.
|
|
654
684
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -668,7 +698,8 @@ declare class ConditionalFormatHighlightRuleBuilder extends ConditionalFormatRul
|
|
|
668
698
|
* @example
|
|
669
699
|
* ```typescript
|
|
670
700
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
671
|
-
* const fWorksheet = fWorkbook.
|
|
701
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
702
|
+
* if (!fWorksheet) return;
|
|
672
703
|
*
|
|
673
704
|
* // Create a conditional formatting rule that highlights cells with text starting with 'https://' in red for the range A1:D10.
|
|
674
705
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -689,7 +720,8 @@ declare class ConditionalFormatDataBarRuleBuilder extends ConditionalFormatRuleB
|
|
|
689
720
|
* @example
|
|
690
721
|
* ```typescript
|
|
691
722
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
692
|
-
* const fWorksheet = fWorkbook.
|
|
723
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
724
|
+
* if (!fWorksheet) return;
|
|
693
725
|
*
|
|
694
726
|
* // Create a conditional formatting rule that adds a data bar to cells with values between -100 and 100 in the range A1:D10.
|
|
695
727
|
* // positive values are green and negative values are red.
|
|
@@ -733,7 +765,8 @@ declare class ConditionalFormatDataBarRuleBuilder extends ConditionalFormatRuleB
|
|
|
733
765
|
* @example
|
|
734
766
|
* ```typescript
|
|
735
767
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
736
|
-
* const fWorksheet = fWorkbook.
|
|
768
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
769
|
+
* if (!fWorksheet) return;
|
|
737
770
|
*
|
|
738
771
|
* // Create a conditional formatting rule that adds a data bar to cells with values between -100 and 100 in the range A1:D10.
|
|
739
772
|
* // positive values are green and negative values are red.
|
|
@@ -767,7 +800,8 @@ declare class ConditionalFormatColorScaleRuleBuilder extends ConditionalFormatRu
|
|
|
767
800
|
* @example
|
|
768
801
|
* ```typescript
|
|
769
802
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
770
|
-
* const fWorksheet = fWorkbook.
|
|
803
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
804
|
+
* if (!fWorksheet) return;
|
|
771
805
|
*
|
|
772
806
|
* // Create a conditional formatting rule that adds a color scale to cells with values between 0 and 100 in the range A1:D10.
|
|
773
807
|
* // The color scale is green for 0, yellow for 50, and red for 100.
|
|
@@ -799,7 +833,8 @@ declare class ConditionalFormatColorScaleRuleBuilder extends ConditionalFormatRu
|
|
|
799
833
|
* @example
|
|
800
834
|
* ```typescript
|
|
801
835
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
802
|
-
* const fWorksheet = fWorkbook.
|
|
836
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
837
|
+
* if (!fWorksheet) return;
|
|
803
838
|
*
|
|
804
839
|
* // Create a conditional formatting rule that adds a color scale to cells with values between 0 and 100 in the range A1:D10.
|
|
805
840
|
* // The color scale is green for 0, yellow for 50, and red for 100.
|
|
@@ -824,7 +859,8 @@ declare class ConditionalFormatIconSetRuleBuilder extends ConditionalFormatRuleB
|
|
|
824
859
|
* @example
|
|
825
860
|
* ```typescript
|
|
826
861
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
827
|
-
* const fWorksheet = fWorkbook.
|
|
862
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
863
|
+
* if (!fWorksheet) return;
|
|
828
864
|
*
|
|
829
865
|
* // Create a 3-arrow icon set conditional formatting rule in the range A1:D10.
|
|
830
866
|
* // The first arrow is green for values greater than 20.
|
|
@@ -884,7 +920,8 @@ declare class ConditionalFormatIconSetRuleBuilder extends ConditionalFormatRuleB
|
|
|
884
920
|
* @example
|
|
885
921
|
* ```typescript
|
|
886
922
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
887
|
-
* const fWorksheet = fWorkbook.
|
|
923
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
924
|
+
* if (!fWorksheet) return;
|
|
888
925
|
*
|
|
889
926
|
* // Create a 3-arrow icon set conditional formatting rule in the range A1:D10.
|
|
890
927
|
* // The first arrow is green for values greater than 20.
|
|
@@ -949,7 +986,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
949
986
|
* @example
|
|
950
987
|
* ```typescript
|
|
951
988
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
952
|
-
* const fWorksheet = fWorkbook.
|
|
989
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
990
|
+
* if (!fWorksheet) return;
|
|
953
991
|
*
|
|
954
992
|
* // Create a conditional formatting rule that highlights cells with values greater than 10 in red for the range A1:D10.
|
|
955
993
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -969,7 +1007,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
969
1007
|
* @example
|
|
970
1008
|
* ```typescript
|
|
971
1009
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
972
|
-
* const fWorksheet = fWorkbook.
|
|
1010
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1011
|
+
* if (!fWorksheet) return;
|
|
973
1012
|
*
|
|
974
1013
|
* // Create a conditional formatting rule that highlights cells with greater than average values in red for the range A1:D10.
|
|
975
1014
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -988,7 +1027,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
988
1027
|
* @example
|
|
989
1028
|
* ```typescript
|
|
990
1029
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
991
|
-
* const fWorksheet = fWorkbook.
|
|
1030
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1031
|
+
* if (!fWorksheet) return;
|
|
992
1032
|
*
|
|
993
1033
|
* // Create a conditional formatting rule that highlights cells with unique values in red for the range A1:D10.
|
|
994
1034
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1007,7 +1047,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1007
1047
|
* @example
|
|
1008
1048
|
* ```typescript
|
|
1009
1049
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1010
|
-
* const fWorksheet = fWorkbook.
|
|
1050
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1051
|
+
* if (!fWorksheet) return;
|
|
1011
1052
|
*
|
|
1012
1053
|
* // Create a conditional formatting rule that highlights cells with duplicate values in red for the range A1:D10.
|
|
1013
1054
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1030,7 +1071,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1030
1071
|
* @example
|
|
1031
1072
|
* ```typescript
|
|
1032
1073
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1033
|
-
* const fWorksheet = fWorkbook.
|
|
1074
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1075
|
+
* if (!fWorksheet) return;
|
|
1034
1076
|
*
|
|
1035
1077
|
* // Create a conditional formatting rule that highlights the bottom 10% of values in red for the range A1:D10.
|
|
1036
1078
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1053,7 +1095,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1053
1095
|
* @example
|
|
1054
1096
|
* ```typescript
|
|
1055
1097
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1056
|
-
* const fWorksheet = fWorkbook.
|
|
1098
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1099
|
+
* if (!fWorksheet) return;
|
|
1057
1100
|
* console.log(fWorksheet.newConditionalFormattingRule().getIconMap()); // icons key-value map
|
|
1058
1101
|
* ```
|
|
1059
1102
|
*/
|
|
@@ -1067,7 +1110,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1067
1110
|
* @example
|
|
1068
1111
|
* ```typescript
|
|
1069
1112
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1070
|
-
* const fWorksheet = fWorkbook.
|
|
1113
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1114
|
+
* if (!fWorksheet) return;
|
|
1071
1115
|
*
|
|
1072
1116
|
* // Create a 3-arrow icon set conditional formatting rule in the range A1:D10.
|
|
1073
1117
|
* // The first arrow is green for values greater than 20.
|
|
@@ -1127,7 +1171,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1127
1171
|
* @example
|
|
1128
1172
|
* ```typescript
|
|
1129
1173
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1130
|
-
* const fWorksheet = fWorkbook.
|
|
1174
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1175
|
+
* if (!fWorksheet) return;
|
|
1131
1176
|
*
|
|
1132
1177
|
* // Create a conditional formatting rule that adds a color scale to cells with values between 0 and 100 in the range A1:D10.
|
|
1133
1178
|
* // The color scale is green for 0, yellow for 50, and red for 100.
|
|
@@ -1164,7 +1209,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1164
1209
|
* @example
|
|
1165
1210
|
* ```typescript
|
|
1166
1211
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1167
|
-
* const fWorksheet = fWorkbook.
|
|
1212
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1213
|
+
* if (!fWorksheet) return;
|
|
1168
1214
|
*
|
|
1169
1215
|
* // Create a conditional formatting rule that adds a data bar to cells with values between -100 and 100 in the range A1:D10.
|
|
1170
1216
|
* // positive values are green and negative values are red.
|
|
@@ -1197,7 +1243,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1197
1243
|
* @example
|
|
1198
1244
|
* ```typescript
|
|
1199
1245
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1200
|
-
* const fWorksheet = fWorkbook.
|
|
1246
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1247
|
+
* if (!fWorksheet) return;
|
|
1201
1248
|
*
|
|
1202
1249
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
1203
1250
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1217,7 +1264,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1217
1264
|
* @example
|
|
1218
1265
|
* ```typescript
|
|
1219
1266
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1220
|
-
* const fWorksheet = fWorkbook.
|
|
1267
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1268
|
+
* if (!fWorksheet) return;
|
|
1221
1269
|
*
|
|
1222
1270
|
* // Create a conditional formatting rule that bolds the text for cells with not empty content in the range A1:D10.
|
|
1223
1271
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1237,7 +1285,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1237
1285
|
* @example
|
|
1238
1286
|
* ```typescript
|
|
1239
1287
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1240
|
-
* const fWorksheet = fWorkbook.
|
|
1288
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1289
|
+
* if (!fWorksheet) return;
|
|
1241
1290
|
*
|
|
1242
1291
|
* // Create a conditional formatting rule that changes the font color to red for cells with not empty content in the range A1:D10.
|
|
1243
1292
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1257,7 +1306,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1257
1306
|
* @example
|
|
1258
1307
|
* ```typescript
|
|
1259
1308
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1260
|
-
* const fWorksheet = fWorkbook.
|
|
1309
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1310
|
+
* if (!fWorksheet) return;
|
|
1261
1311
|
*
|
|
1262
1312
|
* // Create a conditional formatting rule that italicizes the text for cells with not empty content in the range A1:D10.
|
|
1263
1313
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1277,7 +1327,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1277
1327
|
* @example
|
|
1278
1328
|
* ```typescript
|
|
1279
1329
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1280
|
-
* const fWorksheet = fWorkbook.
|
|
1330
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1331
|
+
* if (!fWorksheet) return;
|
|
1281
1332
|
*
|
|
1282
1333
|
* // Create a conditional formatting rule that set text strikethrough for cells with not empty content in the range A1:D10.
|
|
1283
1334
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1297,7 +1348,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1297
1348
|
* @example
|
|
1298
1349
|
* ```typescript
|
|
1299
1350
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1300
|
-
* const fWorksheet = fWorkbook.
|
|
1351
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1352
|
+
* if (!fWorksheet) return;
|
|
1301
1353
|
*
|
|
1302
1354
|
* // Create a conditional formatting rule that underlines the text for cells with not empty content in the range A1:D10.
|
|
1303
1355
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1316,7 +1368,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1316
1368
|
* @example
|
|
1317
1369
|
* ```typescript
|
|
1318
1370
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1319
|
-
* const fWorksheet = fWorkbook.
|
|
1371
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1372
|
+
* if (!fWorksheet) return;
|
|
1320
1373
|
*
|
|
1321
1374
|
* // Create a conditional formatting rule that highlights cells with no content in red for the range A1:D10.
|
|
1322
1375
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1335,7 +1388,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1335
1388
|
* @example
|
|
1336
1389
|
* ```typescript
|
|
1337
1390
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1338
|
-
* const fWorksheet = fWorkbook.
|
|
1391
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1392
|
+
* if (!fWorksheet) return;
|
|
1339
1393
|
*
|
|
1340
1394
|
* // Create a conditional formatting rule that changes the font color to red for cells with not empty content in the range A1:D10.
|
|
1341
1395
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1355,7 +1409,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1355
1409
|
* @example
|
|
1356
1410
|
* ```typescript
|
|
1357
1411
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1358
|
-
* const fWorksheet = fWorkbook.
|
|
1412
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1413
|
+
* if (!fWorksheet) return;
|
|
1359
1414
|
*
|
|
1360
1415
|
* // Create a conditional formatting rule that highlights cells with dates in the last 7 days in red for the range A1:D10.
|
|
1361
1416
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1375,7 +1430,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1375
1430
|
* @example
|
|
1376
1431
|
* ```typescript
|
|
1377
1432
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1378
|
-
* const fWorksheet = fWorkbook.
|
|
1433
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1434
|
+
* if (!fWorksheet) return;
|
|
1379
1435
|
*
|
|
1380
1436
|
* // Create a conditional formatting rule that highlights cells with values greater than 10 in red for the range A1:D10.
|
|
1381
1437
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1396,7 +1452,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1396
1452
|
* @example
|
|
1397
1453
|
* ```typescript
|
|
1398
1454
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1399
|
-
* const fWorksheet = fWorkbook.
|
|
1455
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1456
|
+
* if (!fWorksheet) return;
|
|
1400
1457
|
*
|
|
1401
1458
|
* // Create a conditional formatting rule that highlights cells with values between 10 and 20 in red for the range A1:D10.
|
|
1402
1459
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1416,7 +1473,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1416
1473
|
* @example
|
|
1417
1474
|
* ```typescript
|
|
1418
1475
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1419
|
-
* const fWorksheet = fWorkbook.
|
|
1476
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1477
|
+
* if (!fWorksheet) return;
|
|
1420
1478
|
*
|
|
1421
1479
|
* // Create a conditional formatting rule that highlights cells with values equal to 10 in red for the range A1:D10.
|
|
1422
1480
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1436,7 +1494,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1436
1494
|
* @example
|
|
1437
1495
|
* ```typescript
|
|
1438
1496
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1439
|
-
* const fWorksheet = fWorkbook.
|
|
1497
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1498
|
+
* if (!fWorksheet) return;
|
|
1440
1499
|
*
|
|
1441
1500
|
* // Create a conditional formatting rule that highlights cells with values greater than 10 in red for the range A1:D10.
|
|
1442
1501
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1456,7 +1515,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1456
1515
|
* @example
|
|
1457
1516
|
* ```typescript
|
|
1458
1517
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1459
|
-
* const fWorksheet = fWorkbook.
|
|
1518
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1519
|
+
* if (!fWorksheet) return;
|
|
1460
1520
|
*
|
|
1461
1521
|
* // Create a conditional formatting rule that highlights cells with values greater than or equal to 10 in red for the range A1:D10.
|
|
1462
1522
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1476,7 +1536,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1476
1536
|
* @example
|
|
1477
1537
|
* ```typescript
|
|
1478
1538
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1479
|
-
* const fWorksheet = fWorkbook.
|
|
1539
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1540
|
+
* if (!fWorksheet) return;
|
|
1480
1541
|
*
|
|
1481
1542
|
* // Create a conditional formatting rule that highlights cells with values less than 10 in red for the range A1:D10.
|
|
1482
1543
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1496,7 +1557,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1496
1557
|
* @example
|
|
1497
1558
|
* ```typescript
|
|
1498
1559
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1499
|
-
* const fWorksheet = fWorkbook.
|
|
1560
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1561
|
+
* if (!fWorksheet) return;
|
|
1500
1562
|
*
|
|
1501
1563
|
* // Create a conditional formatting rule that highlights cells with values less than or equal to 10 in red for the range A1:D10.
|
|
1502
1564
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1517,7 +1579,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1517
1579
|
* @example
|
|
1518
1580
|
* ```typescript
|
|
1519
1581
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1520
|
-
* const fWorksheet = fWorkbook.
|
|
1582
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1583
|
+
* if (!fWorksheet) return;
|
|
1521
1584
|
*
|
|
1522
1585
|
* // Create a conditional formatting rule that highlights cells with values not between 10 and 20 in red for the range A1:D10.
|
|
1523
1586
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1537,7 +1600,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1537
1600
|
* @example
|
|
1538
1601
|
* ```typescript
|
|
1539
1602
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1540
|
-
* const fWorksheet = fWorkbook.
|
|
1603
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1604
|
+
* if (!fWorksheet) return;
|
|
1541
1605
|
*
|
|
1542
1606
|
* // Create a conditional formatting rule that highlights cells with values not equal to 10 in red for the range A1:D10.
|
|
1543
1607
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1557,7 +1621,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1557
1621
|
* @example
|
|
1558
1622
|
* ```typescript
|
|
1559
1623
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1560
|
-
* const fWorksheet = fWorkbook.
|
|
1624
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1625
|
+
* if (!fWorksheet) return;
|
|
1561
1626
|
*
|
|
1562
1627
|
* // Create a conditional formatting rule that highlights cells with text containing 'apple' in red for the range A1:D10.
|
|
1563
1628
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1577,7 +1642,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1577
1642
|
* @example
|
|
1578
1643
|
* ```typescript
|
|
1579
1644
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1580
|
-
* const fWorksheet = fWorkbook.
|
|
1645
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1646
|
+
* if (!fWorksheet) return;
|
|
1581
1647
|
*
|
|
1582
1648
|
* // Create a conditional formatting rule that highlights cells with text not containing 'apple' in red for the range A1:D10.
|
|
1583
1649
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1597,7 +1663,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1597
1663
|
* @example
|
|
1598
1664
|
* ```typescript
|
|
1599
1665
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1600
|
-
* const fWorksheet = fWorkbook.
|
|
1666
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1667
|
+
* if (!fWorksheet) return;
|
|
1601
1668
|
*
|
|
1602
1669
|
* // Create a conditional formatting rule that highlights cells with text ending with '.ai' in red for the range A1:D10.
|
|
1603
1670
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1617,7 +1684,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1617
1684
|
* @example
|
|
1618
1685
|
* ```typescript
|
|
1619
1686
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1620
|
-
* const fWorksheet = fWorkbook.
|
|
1687
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1688
|
+
* if (!fWorksheet) return;
|
|
1621
1689
|
*
|
|
1622
1690
|
* // Create a conditional formatting rule that highlights cells with text equal to 'apple' in red for the range A1:D10.
|
|
1623
1691
|
* const fRange = fWorksheet.getRange('A1:D10');
|
|
@@ -1637,7 +1705,8 @@ export declare class FConditionalFormattingBuilder {
|
|
|
1637
1705
|
* @example
|
|
1638
1706
|
* ```typescript
|
|
1639
1707
|
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
1640
|
-
* const fWorksheet = fWorkbook.
|
|
1708
|
+
* const fWorksheet = fWorkbook.getSheetByName('Sheet1');
|
|
1709
|
+
* if (!fWorksheet) return;
|
|
1641
1710
|
*
|
|
1642
1711
|
* // Create a conditional formatting rule that highlights cells with text starting with 'https://' in red for the range A1:D10.
|
|
1643
1712
|
* const fRange = fWorksheet.getRange('A1:D10');
|