/
excelscript.rangeborder.yml
210 lines (199 loc) · 7.69 KB
/
excelscript.rangeborder.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
### YamlMime:TSType
name: ExcelScript.RangeBorder
uid: 'ExcelScript!ExcelScript.RangeBorder:interface'
package: ExcelScript!
fullName: ExcelScript.RangeBorder
summary: Represents the border of an object.
remarks: ''
isPreview: false
isDeprecated: false
type: interface
methods:
- name: getColor()
uid: 'ExcelScript!ExcelScript.RangeBorder#getColor:member(1)'
package: ExcelScript!
fullName: getColor()
summary: >-
HTML color code representing the color of the border line, in the form \#RRGGBB (e.g., "FFA500"), or as a named
HTML color (e.g., "orange").
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getColor(): string;'
return:
type: string
description: ''
- name: getSideIndex()
uid: 'ExcelScript!ExcelScript.RangeBorder#getSideIndex:member(1)'
package: ExcelScript!
fullName: getSideIndex()
summary: Constant value that indicates the specific side of the border. See `ExcelScript.BorderIndex` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getSideIndex(): BorderIndex;'
return:
type: '<xref uid="ExcelScript!ExcelScript.BorderIndex:enum" />'
description: ''
- name: getStyle()
uid: 'ExcelScript!ExcelScript.RangeBorder#getStyle:member(1)'
package: ExcelScript!
fullName: getStyle()
summary: >-
One of the constants of line style specifying the line style for the border. See `ExcelScript.BorderLineStyle` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getStyle(): BorderLineStyle;'
return:
type: '<xref uid="ExcelScript!ExcelScript.BorderLineStyle:enum" />'
description: ''
- name: getTintAndShade()
uid: 'ExcelScript!ExcelScript.RangeBorder#getTintAndShade:member(1)'
package: ExcelScript!
fullName: getTintAndShade()
summary: >-
Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1
(brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform
`tintAndShade` setting.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getTintAndShade(): number;'
return:
type: number
description: ''
- name: getWeight()
uid: 'ExcelScript!ExcelScript.RangeBorder#getWeight:member(1)'
package: ExcelScript!
fullName: getWeight()
summary: Specifies the weight of the border around a range. See `ExcelScript.BorderWeight` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getWeight(): BorderWeight;'
return:
type: '<xref uid="ExcelScript!ExcelScript.BorderWeight:enum" />'
description: ''
- name: setColor(color)
uid: 'ExcelScript!ExcelScript.RangeBorder#setColor:member(1)'
package: ExcelScript!
fullName: setColor(color)
summary: >-
HTML color code representing the color of the border line, in the form \#RRGGBB (e.g., "FFA500"), or as a named
HTML color (e.g., "orange").
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setColor(color: string): void;'
parameters:
- id: color
description: ''
type: string
return:
type: void
description: ''
- name: setStyle(style)
uid: 'ExcelScript!ExcelScript.RangeBorder#setStyle:member(1)'
package: ExcelScript!
fullName: setStyle(style)
summary: >-
One of the constants of line style specifying the line style for the border. See `ExcelScript.BorderLineStyle` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setStyle(style: BorderLineStyle): void;'
parameters:
- id: style
description: ''
type: '<xref uid="ExcelScript!ExcelScript.BorderLineStyle:enum" />'
return:
type: void
description: |-
#### Examples
```TypeScript
/**
* This script adds a border around the outside of a range.
*/
function main(workbook: ExcelScript.Workbook) {
// Get a range from the current worksheet.
let range = workbook.getActiveWorksheet().getRange("B2:E15");
// Add a border around the whole bounding range.
let format = range.getFormat();
format.getRangeBorder(ExcelScript.BorderIndex.edgeTop).setStyle(ExcelScript.BorderLineStyle.continuous); // Top border
format.getRangeBorder(ExcelScript.BorderIndex.edgeBottom).setStyle(ExcelScript.BorderLineStyle.continuous); // Bottom border
format.getRangeBorder(ExcelScript.BorderIndex.edgeLeft).setStyle(ExcelScript.BorderLineStyle.continuous); // Left border
format.getRangeBorder(ExcelScript.BorderIndex.edgeRight).setStyle(ExcelScript.BorderLineStyle.continuous); // Right border
}
```
- name: setTintAndShade(tintAndShade)
uid: 'ExcelScript!ExcelScript.RangeBorder#setTintAndShade:member(1)'
package: ExcelScript!
fullName: setTintAndShade(tintAndShade)
summary: >-
Specifies a double that lightens or darkens a color for the range border, the value is between -1 (darkest) and 1
(brightest), with 0 for the original color. A `null` value indicates that the border doesn't have a uniform
`tintAndShade` setting.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setTintAndShade(tintAndShade: number): void;'
parameters:
- id: tintAndShade
description: ''
type: number
return:
type: void
description: ''
- name: setWeight(weight)
uid: 'ExcelScript!ExcelScript.RangeBorder#setWeight:member(1)'
package: ExcelScript!
fullName: setWeight(weight)
summary: Specifies the weight of the border around a range. See `ExcelScript.BorderWeight` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setWeight(weight: BorderWeight): void;'
parameters:
- id: weight
description: ''
type: '<xref uid="ExcelScript!ExcelScript.BorderWeight:enum" />'
return:
type: void
description: |-
#### Examples
```TypeScript
/**
* This script creates a border around a range.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the RangeFormat object for the range "B2:G10".
const currentSheet = workbook.getActiveWorksheet();
const rangeForBorder = currentSheet.getRange("B2:G10");
const format = rangeForBorder.getFormat();
// Get a RangeBorder object for each edge of the range and set the border properties.
let edgeTop = format.getRangeBorder(ExcelScript.BorderIndex.edgeTop);
edgeTop.setStyle(ExcelScript.BorderLineStyle.dashDot);
edgeTop.setWeight(ExcelScript.BorderWeight.thick);
let edgeBottom = format.getRangeBorder(ExcelScript.BorderIndex.edgeBottom);
edgeBottom.setStyle(ExcelScript.BorderLineStyle.dashDot);
edgeBottom.setWeight(ExcelScript.BorderWeight.thick);
let edgeLeft = format.getRangeBorder(ExcelScript.BorderIndex.edgeLeft);
edgeLeft.setStyle(ExcelScript.BorderLineStyle.dashDot);
edgeLeft.setWeight(ExcelScript.BorderWeight.thick);
let edgeRight = format.getRangeBorder(ExcelScript.BorderIndex.edgeRight);
edgeRight.setStyle(ExcelScript.BorderLineStyle.dashDot);
edgeRight.setWeight(ExcelScript.BorderWeight.thick);
}
```