-
Notifications
You must be signed in to change notification settings - Fork 63
/
excel.rangeareas.yml
821 lines (810 loc) · 37.9 KB
/
excel.rangeareas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
### YamlMime:TSType
name: Excel.RangeAreas
uid: 'excel!Excel.RangeAreas:class'
package: excel!
fullName: Excel.RangeAreas
summary: >-
`RangeAreas` represents a collection of one or more rectangular ranges in the same worksheet. To learn how to use
discontiguous ranges, read [Work with multiple ranges simultaneously in Excel
add-ins](https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-multiple-ranges)<!-- -->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
type: class
properties:
- name: address
uid: 'excel!Excel.RangeAreas#address:member'
package: excel!
fullName: address
summary: >-
Returns the `RangeAreas` reference in A1-style. Address value will contain the worksheet name for each rectangular
block of cells (e.g., "Sheet1!A1:B4, Sheet1!D1:D4").
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly address: string;'
return:
type: string
- name: addressLocal
uid: 'excel!Excel.RangeAreas#addressLocal:member'
package: excel!
fullName: addressLocal
summary: Returns the `RangeAreas` reference in the user locale.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly addressLocal: string;'
return:
type: string
- name: areaCount
uid: 'excel!Excel.RangeAreas#areaCount:member'
package: excel!
fullName: areaCount
summary: Returns the number of rectangular ranges that comprise this `RangeAreas` object.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly areaCount: number;'
return:
type: number
- name: areas
uid: 'excel!Excel.RangeAreas#areas:member'
package: excel!
fullName: areas
summary: Returns a collection of rectangular ranges that comprise this `RangeAreas` object.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly areas: Excel.RangeCollection;'
return:
type: '<xref uid="excel!Excel.RangeCollection:class" />'
- name: cellCount
uid: 'excel!Excel.RangeAreas#cellCount:member'
package: excel!
fullName: cellCount
summary: >-
Returns the number of cells in the `RangeAreas` object, summing up the cell counts of all of the individual
rectangular ranges. Returns -1 if the cell count exceeds 2^31-1 (2,147,483,647).
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly cellCount: number;'
return:
type: number
- name: conditionalFormats
uid: 'excel!Excel.RangeAreas#conditionalFormats:member'
package: excel!
fullName: conditionalFormats
summary: Returns a collection of conditional formats that intersect with any cells in this `RangeAreas` object.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly conditionalFormats: Excel.ConditionalFormatCollection;'
return:
type: '<xref uid="excel!Excel.ConditionalFormatCollection:class" />'
- name: context
uid: 'excel!Excel.RangeAreas#context:member'
package: excel!
fullName: context
summary: >-
The request context associated with the object. This connects the add-in's process to the Office host
application's process.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'context: RequestContext;'
return:
type: '<xref uid="excel!Excel.RequestContext:class" />'
- name: dataValidation
uid: 'excel!Excel.RangeAreas#dataValidation:member'
package: excel!
fullName: dataValidation
summary: Returns a data validation object for all ranges in the `RangeAreas`<!-- -->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly dataValidation: Excel.DataValidation;'
return:
type: '<xref uid="excel!Excel.DataValidation:class" />'
- name: format
uid: 'excel!Excel.RangeAreas#format:member'
package: excel!
fullName: format
summary: >-
Returns a `RangeFormat` object, encapsulating the font, fill, borders, alignment, and other properties for all
ranges in the `RangeAreas` object.
remarks: >-
\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/42-range/range-areas.yaml
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getActiveWorksheet();
const usedRange = sheet.getUsedRange();
// Find the ranges with formulas.
const formulaRanges = usedRange.getSpecialCells("Formulas");
formulaRanges.format.fill.color = "lightgreen";
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: 'readonly format: Excel.RangeFormat;'
return:
type: '<xref uid="excel!Excel.RangeFormat:class" />'
- name: isEntireColumn
uid: 'excel!Excel.RangeAreas#isEntireColumn:member'
package: excel!
fullName: isEntireColumn
summary: 'Specifies if all the ranges on this `RangeAreas` object represent entire columns (e.g., "A:C, Q:Z").'
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly isEntireColumn: boolean;'
return:
type: boolean
- name: isEntireRow
uid: 'excel!Excel.RangeAreas#isEntireRow:member'
package: excel!
fullName: isEntireRow
summary: 'Specifies if all the ranges on this `RangeAreas` object represent entire rows (e.g., "1:3, 5:7").'
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly isEntireRow: boolean;'
return:
type: boolean
- name: style
uid: 'excel!Excel.RangeAreas#style:member'
package: excel!
fullName: style
summary: >-
Represents the style for all ranges in this `RangeAreas` object. If the styles of the cells are inconsistent,
`null` will be returned. For custom styles, the style name will be returned. For built-in styles, a string
representing a value in the `BuiltInStyle` enum will be returned.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'style: string;'
return:
type: string
- name: worksheet
uid: 'excel!Excel.RangeAreas#worksheet:member'
package: excel!
fullName: worksheet
summary: Returns the worksheet for the current `RangeAreas`<!-- -->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'readonly worksheet: Excel.Worksheet;'
return:
type: '<xref uid="excel!Excel.Worksheet:class" />'
methods:
- name: calculate()
uid: 'excel!Excel.RangeAreas#calculate:member(1)'
package: excel!
fullName: calculate()
summary: Calculates all cells in the `RangeAreas`<!-- -->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'calculate(): void;'
return:
type: void
description: ''
- name: clear(applyTo)
uid: 'excel!Excel.RangeAreas#clear:member(1)'
package: excel!
fullName: clear(applyTo)
summary: >-
Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas`
object.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'clear(applyTo?: Excel.ClearApplyTo): void;'
parameters:
- id: applyTo
description: Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. Default is "All".
type: '<xref uid="excel!Excel.ClearApplyTo:enum" />'
return:
type: void
description: ''
- name: clear(applyToString)
uid: 'excel!Excel.RangeAreas#clear:member(2)'
package: excel!
fullName: clear(applyToString)
summary: >-
Clears values, format, fill, border, and other properties on each of the areas that comprise this `RangeAreas`
object.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'clear(applyToString?: "All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"): void;'
parameters:
- id: applyToString
description: Optional. Determines the type of clear action. See `Excel.ClearApplyTo` for details. Default is "All".
type: '"All" | "Formats" | "Contents" | "Hyperlinks" | "RemoveHyperlinks"'
return:
type: void
description: ''
- name: convertDataTypeToText()
uid: 'excel!Excel.RangeAreas#convertDataTypeToText:member(1)'
package: excel!
fullName: convertDataTypeToText()
summary: Converts all cells in the `RangeAreas` with data types into text.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'convertDataTypeToText(): void;'
return:
type: void
description: ''
- name: 'convertToLinkedDataType(serviceID, languageCulture)'
uid: 'excel!Excel.RangeAreas#convertToLinkedDataType:member(1)'
package: excel!
fullName: 'convertToLinkedDataType(serviceID, languageCulture)'
summary: Converts all cells in the `RangeAreas` into linked data types.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'convertToLinkedDataType(serviceID: number, languageCulture: string): void;'
parameters:
- id: serviceID
description: The service ID which will be used to query the data.
type: number
- id: languageCulture
description: Language culture to query the service for.
type: string
return:
type: void
description: ''
- name: 'copyFrom(sourceRange, copyType, skipBlanks, transpose)'
uid: 'excel!Excel.RangeAreas#copyFrom:member(1)'
package: excel!
fullName: 'copyFrom(sourceRange, copyType, skipBlanks, transpose)'
summary: >-
Copies cell data or formatting from the source range or `RangeAreas` to the current `RangeAreas`<!-- -->. The
destination `RangeAreas` can be a different size than the source range or `RangeAreas`<!-- -->. The destination
will be expanded automatically if it is smaller than the source.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
copyFrom(sourceRange: Range | RangeAreas | string, copyType?: Excel.RangeCopyType, skipBlanks?: boolean,
transpose?: boolean): void;
parameters:
- id: sourceRange
description: >-
The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form
must able to be created by removing full rows or columns from a rectangular range.
type: '<xref uid="excel!Excel.Range:class" /> | <xref uid="excel!Excel.RangeAreas:class" /> | string'
- id: copyType
description: The type of cell data or formatting to copy over. Default is "All".
type: '<xref uid="excel!Excel.RangeCopyType:enum" />'
- id: skipBlanks
description: True if to skip blank cells in the source range or `RangeAreas`<!-- -->. Default is false.
type: boolean
- id: transpose
description: True if to transpose the cells in the destination `RangeAreas`<!-- -->. Default is false.
type: boolean
return:
type: void
description: ''
- name: 'copyFrom(sourceRange, copyTypeString, skipBlanks, transpose)'
uid: 'excel!Excel.RangeAreas#copyFrom:member(2)'
package: excel!
fullName: 'copyFrom(sourceRange, copyTypeString, skipBlanks, transpose)'
summary: >-
Copies cell data or formatting from the source range or `RangeAreas` to the current `RangeAreas`<!-- -->. The
destination `RangeAreas` can be a different size than the source range or `RangeAreas`<!-- -->. The destination
will be expanded automatically if it is smaller than the source.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
copyFrom(sourceRange: Range | RangeAreas | string, copyTypeString?: "All" | "Formulas" | "Values" | "Formats" |
"Link", skipBlanks?: boolean, transpose?: boolean): void;
parameters:
- id: sourceRange
description: >-
The source range or `RangeAreas` to copy from. When the source `RangeAreas` has multiple ranges, their form
must able to be created by removing full rows or columns from a rectangular range.
type: '<xref uid="excel!Excel.Range:class" /> | <xref uid="excel!Excel.RangeAreas:class" /> | string'
- id: copyTypeString
description: The type of cell data or formatting to copy over. Default is "All".
type: '"All" | "Formulas" | "Values" | "Formats" | "Link"'
- id: skipBlanks
description: True if to skip blank cells in the source range or `RangeAreas`<!-- -->. Default is false.
type: boolean
- id: transpose
description: True if to transpose the cells in the destination `RangeAreas`<!-- -->. Default is false.
type: boolean
return:
type: void
description: ''
- name: getEntireColumn()
uid: 'excel!Excel.RangeAreas#getEntireColumn:member(1)'
package: excel!
fullName: getEntireColumn()
summary: >-
Returns a `RangeAreas` object that represents the entire columns of the `RangeAreas` (for example, if the current
`RangeAreas` represents cells "B4:E11, H2", it returns a `RangeAreas` that represents columns "B:E, H:H").
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getEntireColumn(): Excel.RangeAreas;'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: getEntireRow()
uid: 'excel!Excel.RangeAreas#getEntireRow:member(1)'
package: excel!
fullName: getEntireRow()
summary: >-
Returns a `RangeAreas` object that represents the entire rows of the `RangeAreas` (for example, if the current
`RangeAreas` represents cells "B4:E11", it returns a `RangeAreas` that represents rows "4:11").
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getEntireRow(): Excel.RangeAreas;'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: getIntersection(anotherRange)
uid: 'excel!Excel.RangeAreas#getIntersection:member(1)'
package: excel!
fullName: getIntersection(anotherRange)
summary: >-
Returns the `RangeAreas` object that represents the intersection of the given ranges or `RangeAreas`<!-- -->. If
no intersection is found, an `ItemNotFound` error will be thrown.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getIntersection(anotherRange: Range | RangeAreas | string): Excel.RangeAreas;'
parameters:
- id: anotherRange
description: 'The range, `RangeAreas` object, or range address that will be used to determine the intersection.'
type: '<xref uid="excel!Excel.Range:class" /> | <xref uid="excel!Excel.RangeAreas:class" /> | string'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: getIntersectionOrNullObject(anotherRange)
uid: 'excel!Excel.RangeAreas#getIntersectionOrNullObject:member(1)'
package: excel!
fullName: getIntersectionOrNullObject(anotherRange)
summary: >-
Returns the `RangeAreas` object that represents the intersection of the given ranges or `RangeAreas`<!-- -->. If
no intersection is found, then this method returns an object with its `isNullObject` property set to `true`<!--
-->. For further information, see [*OrNullObject methods and
properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties)<!--
-->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getIntersectionOrNullObject(anotherRange: Range | RangeAreas | string): Excel.RangeAreas;'
parameters:
- id: anotherRange
description: 'The range, `RangeAreas` object, or address that will be used to determine the intersection.'
type: '<xref uid="excel!Excel.Range:class" /> | <xref uid="excel!Excel.RangeAreas:class" /> | string'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: 'getOffsetRangeAreas(rowOffset, columnOffset)'
uid: 'excel!Excel.RangeAreas#getOffsetRangeAreas:member(1)'
package: excel!
fullName: 'getOffsetRangeAreas(rowOffset, columnOffset)'
summary: >-
Returns a `RangeAreas` object that is shifted by the specific row and column offset. The dimension of the returned
`RangeAreas` will match the original object. If the resulting `RangeAreas` is forced outside the bounds of the
worksheet grid, an error will be thrown.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getOffsetRangeAreas(rowOffset: number, columnOffset: number): Excel.RangeAreas;'
parameters:
- id: rowOffset
description: >-
The number of rows (positive, negative, or 0) by which the `RangeAreas` is to be offset. Positive values are
offset downward, and negative values are offset upward.
type: number
- id: columnOffset
description: >-
The number of columns (positive, negative, or 0) by which the `RangeAreas` is to be offset. Positive values
are offset to the right, and negative values are offset to the left.
type: number
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: 'getSpecialCells(cellType, cellValueType)'
uid: 'excel!Excel.RangeAreas#getSpecialCells:member(1)'
package: excel!
fullName: 'getSpecialCells(cellType, cellValueType)'
summary: >-
Returns a `RangeAreas` object that represents all the cells that match the specified type and value. Throws an
error if no special cells are found that match the criteria.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getSpecialCells(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType): Excel.RangeAreas;'
parameters:
- id: cellType
description: The type of cells to include.
type: '<xref uid="excel!Excel.SpecialCellType:enum" />'
- id: cellValueType
description: >-
If `cellType` is either `constants` or `formulas`<!-- -->, this argument is used to determine which types of
cells to include in the result. These values can be combined together to return more than one type. The
default is to select all constants or formulas, no matter what the type.
type: '<xref uid="excel!Excel.SpecialCellValueType:enum" />'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: 'getSpecialCells(cellTypeString, cellValueTypeString)'
uid: 'excel!Excel.RangeAreas#getSpecialCells:member(2)'
package: excel!
fullName: 'getSpecialCells(cellTypeString, cellValueTypeString)'
summary: >-
Returns a `RangeAreas` object that represents all the cells that match the specified type and value. Throws an
error if no special cells are found that match the criteria.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
getSpecialCells(cellTypeString: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" |
"SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueTypeString?: "All" | "Errors" |
"ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" |
"ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" |
"NumbersText" | "Text"): Excel.RangeAreas;
parameters:
- id: cellTypeString
description: The type of cells to include.
type: >-
"ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" |
"SameDataValidation" | "Visible"
- id: cellValueTypeString
description: >-
If `cellType` is either `constants` or `formulas`<!-- -->, this argument is used to determine which types of
cells to include in the result. These values can be combined together to return more than one type. The
default is to select all constants or formulas, no matter what the type.
type: >-
"All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" |
"ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" |
"LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: 'getSpecialCellsOrNullObject(cellType, cellValueType)'
uid: 'excel!Excel.RangeAreas#getSpecialCellsOrNullObject:member(1)'
package: excel!
fullName: 'getSpecialCellsOrNullObject(cellType, cellValueType)'
summary: >-
Returns a `RangeAreas` object that represents all the cells that match the specified type and value. If no special
cells are found that match the criteria, then this method returns an object with its `isNullObject` property set
to `true`<!-- -->. For further information, see [*OrNullObject methods and
properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties)<!--
-->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
getSpecialCellsOrNullObject(cellType: Excel.SpecialCellType, cellValueType?: Excel.SpecialCellValueType):
Excel.RangeAreas;
parameters:
- id: cellType
description: The type of cells to include.
type: '<xref uid="excel!Excel.SpecialCellType:enum" />'
- id: cellValueType
description: >-
If `cellType` is either `constants` or `formulas`<!-- -->, this argument is used to determine which types of
cells to include in the result. These values can be combined together to return more than one type. The
default is to select all constants or formulas, no matter what the type.
type: '<xref uid="excel!Excel.SpecialCellValueType:enum" />'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: 'getSpecialCellsOrNullObject(cellTypeString, cellValueTypeString)'
uid: 'excel!Excel.RangeAreas#getSpecialCellsOrNullObject:member(2)'
package: excel!
fullName: 'getSpecialCellsOrNullObject(cellTypeString, cellValueTypeString)'
summary: >-
Returns a `RangeAreas` object that represents all the cells that match the specified type and value. If no special
cells are found that match the criteria, then this method returns an object with its `isNullObject` property set
to `true`<!-- -->. For further information, see [*OrNullObject methods and
properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties)<!--
-->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
getSpecialCellsOrNullObject(cellTypeString: "ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" |
"Formulas" | "SameConditionalFormat" | "SameDataValidation" | "Visible", cellValueTypeString?: "All" | "Errors"
| "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" | "ErrorsLogicalText" |
"ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" | "LogicalNumbersText" | "Numbers" |
"NumbersText" | "Text"): Excel.RangeAreas;
parameters:
- id: cellTypeString
description: The type of cells to include.
type: >-
"ConditionalFormats" | "DataValidations" | "Blanks" | "Constants" | "Formulas" | "SameConditionalFormat" |
"SameDataValidation" | "Visible"
- id: cellValueTypeString
description: >-
If `cellType` is either `constants` or `formulas`<!-- -->, this argument is used to determine which types of
cells to include in the result. These values can be combined together to return more than one type. The
default is to select all constants or formulas, no matter what the type.
type: >-
"All" | "Errors" | "ErrorsLogical" | "ErrorsNumbers" | "ErrorsText" | "ErrorsLogicalNumber" |
"ErrorsLogicalText" | "ErrorsNumberText" | "Logical" | "LogicalNumbers" | "LogicalText" |
"LogicalNumbersText" | "Numbers" | "NumbersText" | "Text"
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: getTables(fullyContained)
uid: 'excel!Excel.RangeAreas#getTables:member(1)'
package: excel!
fullName: getTables(fullyContained)
summary: Returns a scoped collection of tables that overlap with any range in this `RangeAreas` object.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getTables(fullyContained?: boolean): Excel.TableScopedCollection;'
parameters:
- id: fullyContained
description: >-
If `true`<!-- -->, returns only tables that are fully contained within the range bounds. Default is
`false`<!-- -->.
type: boolean
return:
type: '<xref uid="excel!Excel.TableScopedCollection:class" />'
description: ''
- name: getUsedRangeAreas(valuesOnly)
uid: 'excel!Excel.RangeAreas#getUsedRangeAreas:member(1)'
package: excel!
fullName: getUsedRangeAreas(valuesOnly)
summary: >-
Returns the used `RangeAreas` that comprises all the used areas of individual rectangular ranges in the
`RangeAreas` object. If there are no used cells within the `RangeAreas`<!-- -->, the `ItemNotFound` error will be
thrown.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getUsedRangeAreas(valuesOnly?: boolean): Excel.RangeAreas;'
parameters:
- id: valuesOnly
description: Whether to only consider cells with values as used cells. Default is `false`<!-- -->.
type: boolean
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: getUsedRangeAreasOrNullObject(valuesOnly)
uid: 'excel!Excel.RangeAreas#getUsedRangeAreasOrNullObject:member(1)'
package: excel!
fullName: getUsedRangeAreasOrNullObject(valuesOnly)
summary: >-
Returns the used `RangeAreas` that comprises all the used areas of individual rectangular ranges in the
`RangeAreas` object. If there are no used cells within the `RangeAreas`<!-- -->, then this method returns an
object with its `isNullObject` property set to `true`<!-- -->. For further information, see [*OrNullObject
methods and
properties](https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties)<!--
-->.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'getUsedRangeAreasOrNullObject(valuesOnly?: boolean): Excel.RangeAreas;'
parameters:
- id: valuesOnly
description: Whether to only consider cells with values as used cells.
type: boolean
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: load(options)
uid: 'excel!Excel.RangeAreas#load:member(1)'
package: excel!
fullName: load(options)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'load(options?: Excel.Interfaces.RangeAreasLoadOptions): Excel.RangeAreas;'
parameters:
- id: options
description: Provides options for which properties of the object to load.
type: '<xref uid="excel!Excel.Interfaces.RangeAreasLoadOptions:interface" />'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: load(propertyNames)
uid: 'excel!Excel.RangeAreas#load:member(2)'
package: excel!
fullName: load(propertyNames)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'load(propertyNames?: string | string[]): Excel.RangeAreas;'
parameters:
- id: propertyNames
description: A comma-delimited string or an array of strings that specify the properties to load.
type: 'string | string[]'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: load(propertyNamesAndPaths)
uid: 'excel!Excel.RangeAreas#load:member(3)'
package: excel!
fullName: load(propertyNamesAndPaths)
summary: >-
Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading
the properties.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: |-
load(propertyNamesAndPaths?: {
select?: string;
expand?: string;
}): Excel.RangeAreas;
parameters:
- id: propertyNamesAndPaths
description: >-
`propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and
`propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
type: |-
{
select?: string;
expand?: string;
}
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: 'set(properties, options)'
uid: 'excel!Excel.RangeAreas#set:member(1)'
package: excel!
fullName: 'set(properties, options)'
summary: >-
Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate
properties, or another API object of the same type.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'set(properties: Interfaces.RangeAreasUpdateData, options?: OfficeExtension.UpdateOptions): void;'
parameters:
- id: properties
description: >-
A JavaScript object with properties that are structured isomorphically to the properties of the object on
which the method is called.
type: '<xref uid="excel!Excel.Interfaces.RangeAreasUpdateData:interface" />'
- id: options
description: Provides an option to suppress errors if the properties object tries to set any read-only properties.
type: '<xref uid="office!OfficeExtension.UpdateOptions:interface" />'
return:
type: void
description: ''
- name: set(properties)
uid: 'excel!Excel.RangeAreas#set:member(2)'
package: excel!
fullName: set(properties)
summary: 'Sets multiple properties on the object at the same time, based on an existing loaded object.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'set(properties: Excel.RangeAreas): void;'
parameters:
- id: properties
description: ''
type: '<xref uid="excel!Excel.RangeAreas:class" />'
return:
type: void
description: ''
- name: setDirty()
uid: 'excel!Excel.RangeAreas#setDirty:member(1)'
package: excel!
fullName: setDirty()
summary: Sets the `RangeAreas` to be recalculated when the next recalculation occurs.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'setDirty(): void;'
return:
type: void
description: ''
- name: toJSON()
uid: 'excel!Excel.RangeAreas#toJSON:member(1)'
package: excel!
fullName: toJSON()
summary: >-
Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to
`JSON.stringify()`<!-- -->. (`JSON.stringify`<!-- -->, in turn, calls the `toJSON` method of the object that is
passed to it.) Whereas the original Excel.RangeAreas object is an API object, the `toJSON` method returns a plain
JavaScript object (typed as `Excel.Interfaces.RangeAreasData`<!-- -->) that contains shallow copies of any loaded
child properties from the original object.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'toJSON(): Excel.Interfaces.RangeAreasData;'
return:
type: '<xref uid="excel!Excel.Interfaces.RangeAreasData:interface" />'
description: ''
- name: track()
uid: 'excel!Excel.RangeAreas#track:member(1)'
package: excel!
fullName: track()
summary: >-
Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand
for
[context.trackedObjects.add(thisObject)](https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member)<!--
-->. If you are using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and
get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the
object to the tracked object collection when the object was first created.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'track(): Excel.RangeAreas;'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
- name: untrack()
uid: 'excel!Excel.RangeAreas#untrack:member(1)'
package: excel!
fullName: untrack()
summary: >-
Release the memory associated with this object, if it has previously been tracked. This call is shorthand for
[context.trackedObjects.remove(thisObject)](https://docs.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member)<!--
-->. Having many tracked objects slows down the host application, so please remember to free any objects you add,
once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'untrack(): Excel.RangeAreas;'
return:
type: '<xref uid="excel!Excel.RangeAreas:class" />'
description: ''
extends: '<xref uid="office!OfficeExtension.ClientObject:class" />'