/
excelscript.specialcelltype.yml
62 lines (57 loc) · 2.22 KB
/
excelscript.specialcelltype.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
### YamlMime:TSEnum
name: ExcelScript.SpecialCellType
uid: 'ExcelScript!ExcelScript.SpecialCellType:enum'
package: ExcelScript!
fullName: ExcelScript.SpecialCellType
summary: ''
remarks: |-
#### Examples
```TypeScript
/**
* This script finds and highlights all the cells in the current worksheet that contain a formula.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the used range on the current sheet.
const currentSheet = workbook.getActiveWorksheet();
const usedRange = currentSheet.getUsedRange();
// Get the RangeAreas object for each cell with a formula.
const formulaCells = usedRange.getSpecialCells(ExcelScript.SpecialCellType.formulas);
// Add a light blue background to the cells containing formulas.
formulaCells.getFormat().getFill().setColor("#ADD8E6");
}
```
isPreview: false
isDeprecated: false
fields:
- name: blanks
uid: 'ExcelScript!ExcelScript.SpecialCellType.blanks:member'
package: ExcelScript!
summary: Cells with no content.
- name: conditionalFormats
uid: 'ExcelScript!ExcelScript.SpecialCellType.conditionalFormats:member'
package: ExcelScript!
summary: All cells with conditional formats.
- name: constants
uid: 'ExcelScript!ExcelScript.SpecialCellType.constants:member'
package: ExcelScript!
summary: Cells containing constants.
- name: dataValidations
uid: 'ExcelScript!ExcelScript.SpecialCellType.dataValidations:member'
package: ExcelScript!
summary: Cells with validation criteria.
- name: formulas
uid: 'ExcelScript!ExcelScript.SpecialCellType.formulas:member'
package: ExcelScript!
summary: Cells containing formulas.
- name: sameConditionalFormat
uid: 'ExcelScript!ExcelScript.SpecialCellType.sameConditionalFormat:member'
package: ExcelScript!
summary: Cells with the same conditional format as the first cell in the range.
- name: sameDataValidation
uid: 'ExcelScript!ExcelScript.SpecialCellType.sameDataValidation:member'
package: ExcelScript!
summary: Cells with the same data validation criteria as the first cell in the range.
- name: visible
uid: 'ExcelScript!ExcelScript.SpecialCellType.visible:member'
package: ExcelScript!
summary: Cells that are visible.