/
excelscript.textframe.yml
433 lines (428 loc) · 15 KB
/
excelscript.textframe.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
### YamlMime:TSType
name: ExcelScript.TextFrame
uid: 'ExcelScript!ExcelScript.TextFrame:interface'
package: ExcelScript!
fullName: ExcelScript.TextFrame
summary: Represents the text frame of a shape object.
remarks: |-
#### Examples
```TypeScript
/**
* This script creates a star shape with the value from cell A1.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the value of A1 from the worksheet named Sheet1.
const sheet = workbook.getWorksheet("Sheet1");
const value = sheet.getRange("A1").getValue();
// Create a Shape object that looks like a 5-pointed star.
const star = sheet.addGeometricShape(ExcelScript.GeometricShapeType.star5);
// Set the text of star and make sure the shape fits the text.
const textFrame: ExcelScript.TextFrame = star.getTextFrame();
textFrame.getTextRange().setText(value.toString());
textFrame.setAutoSizeSetting(ExcelScript.ShapeAutoSize.autoSizeShapeToFitText);
}
```
isPreview: false
isDeprecated: false
type: interface
methods:
- name: deleteText()
uid: 'ExcelScript!ExcelScript.TextFrame#deleteText:member(1)'
package: ExcelScript!
fullName: deleteText()
summary: Deletes all the text in the text frame.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'deleteText(): void;'
return:
type: void
description: ''
- name: getAutoSizeSetting()
uid: 'ExcelScript!ExcelScript.TextFrame#getAutoSizeSetting:member(1)'
package: ExcelScript!
fullName: getAutoSizeSetting()
summary: >-
The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the
text frame, to automatically fit the text frame to the text, or not perform any automatic sizing.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getAutoSizeSetting(): ShapeAutoSize;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeAutoSize:enum" />'
description: ''
- name: getBottomMargin()
uid: 'ExcelScript!ExcelScript.TextFrame#getBottomMargin:member(1)'
package: ExcelScript!
fullName: getBottomMargin()
summary: 'Represents the bottom margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getBottomMargin(): number;'
return:
type: number
description: ''
- name: getHasText()
uid: 'ExcelScript!ExcelScript.TextFrame#getHasText:member(1)'
package: ExcelScript!
fullName: getHasText()
summary: Specifies if the text frame contains text.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getHasText(): boolean;'
return:
type: boolean
description: ''
- name: getHorizontalAlignment()
uid: 'ExcelScript!ExcelScript.TextFrame#getHorizontalAlignment:member(1)'
package: ExcelScript!
fullName: getHorizontalAlignment()
summary: Represents the horizontal alignment of the text frame. See `ExcelScript.ShapeTextHorizontalAlignment` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getHorizontalAlignment(): ShapeTextHorizontalAlignment;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextHorizontalAlignment:enum" />'
description: ''
- name: getHorizontalOverflow()
uid: 'ExcelScript!ExcelScript.TextFrame#getHorizontalOverflow:member(1)'
package: ExcelScript!
fullName: getHorizontalOverflow()
summary: >-
Represents the horizontal overflow behavior of the text frame. See `ExcelScript.ShapeTextHorizontalOverflow` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getHorizontalOverflow(): ShapeTextHorizontalOverflow;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextHorizontalOverflow:enum" />'
description: ''
- name: getLeftMargin()
uid: 'ExcelScript!ExcelScript.TextFrame#getLeftMargin:member(1)'
package: ExcelScript!
fullName: getLeftMargin()
summary: 'Represents the left margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getLeftMargin(): number;'
return:
type: number
description: ''
- name: getOrientation()
uid: 'ExcelScript!ExcelScript.TextFrame#getOrientation:member(1)'
package: ExcelScript!
fullName: getOrientation()
summary: >-
Represents the angle to which the text is oriented for the text frame. See `ExcelScript.ShapeTextOrientation` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getOrientation(): ShapeTextOrientation;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextOrientation:enum" />'
description: ''
- name: getReadingOrder()
uid: 'ExcelScript!ExcelScript.TextFrame#getReadingOrder:member(1)'
package: ExcelScript!
fullName: getReadingOrder()
summary: >-
Represents the reading order of the text frame, either left-to-right or right-to-left. See
`ExcelScript.ShapeTextReadingOrder` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getReadingOrder(): ShapeTextReadingOrder;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextReadingOrder:enum" />'
description: ''
- name: getRightMargin()
uid: 'ExcelScript!ExcelScript.TextFrame#getRightMargin:member(1)'
package: ExcelScript!
fullName: getRightMargin()
summary: 'Represents the right margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getRightMargin(): number;'
return:
type: number
description: ''
- name: getTextRange()
uid: 'ExcelScript!ExcelScript.TextFrame#getTextRange:member(1)'
package: ExcelScript!
fullName: getTextRange()
summary: >-
Represents the text that is attached to a shape in the text frame, and properties and methods for manipulating the
text. See `ExcelScript.TextRange` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getTextRange(): TextRange;'
return:
type: '<xref uid="ExcelScript!ExcelScript.TextRange:interface" />'
description: ''
- name: getTopMargin()
uid: 'ExcelScript!ExcelScript.TextFrame#getTopMargin:member(1)'
package: ExcelScript!
fullName: getTopMargin()
summary: 'Represents the top margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getTopMargin(): number;'
return:
type: number
description: ''
- name: getVerticalAlignment()
uid: 'ExcelScript!ExcelScript.TextFrame#getVerticalAlignment:member(1)'
package: ExcelScript!
fullName: getVerticalAlignment()
summary: Represents the vertical alignment of the text frame. See `ExcelScript.ShapeTextVerticalAlignment` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getVerticalAlignment(): ShapeTextVerticalAlignment;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextVerticalAlignment:enum" />'
description: ''
- name: getVerticalOverflow()
uid: 'ExcelScript!ExcelScript.TextFrame#getVerticalOverflow:member(1)'
package: ExcelScript!
fullName: getVerticalOverflow()
summary: >-
Represents the vertical overflow behavior of the text frame. See `ExcelScript.ShapeTextVerticalOverflow` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'getVerticalOverflow(): ShapeTextVerticalOverflow;'
return:
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextVerticalOverflow:enum" />'
description: ''
- name: setAutoSizeSetting(autoSizeSetting)
uid: 'ExcelScript!ExcelScript.TextFrame#setAutoSizeSetting:member(1)'
package: ExcelScript!
fullName: setAutoSizeSetting(autoSizeSetting)
summary: >-
The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the
text frame, to automatically fit the text frame to the text, or not perform any automatic sizing.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setAutoSizeSetting(autoSizeSetting: ShapeAutoSize): void;'
parameters:
- id: autoSizeSetting
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeAutoSize:enum" />'
return:
type: void
description: ''
- name: setBottomMargin(bottomMargin)
uid: 'ExcelScript!ExcelScript.TextFrame#setBottomMargin:member(1)'
package: ExcelScript!
fullName: setBottomMargin(bottomMargin)
summary: 'Represents the bottom margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setBottomMargin(bottomMargin: number): void;'
parameters:
- id: bottomMargin
description: ''
type: number
return:
type: void
description: ''
- name: setHorizontalAlignment(horizontalAlignment)
uid: 'ExcelScript!ExcelScript.TextFrame#setHorizontalAlignment:member(1)'
package: ExcelScript!
fullName: setHorizontalAlignment(horizontalAlignment)
summary: Represents the horizontal alignment of the text frame. See `ExcelScript.ShapeTextHorizontalAlignment` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: |-
setHorizontalAlignment(
horizontalAlignment: ShapeTextHorizontalAlignment
): void;
parameters:
- id: horizontalAlignment
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextHorizontalAlignment:enum" />'
return:
type: void
description: ''
- name: setHorizontalOverflow(horizontalOverflow)
uid: 'ExcelScript!ExcelScript.TextFrame#setHorizontalOverflow:member(1)'
package: ExcelScript!
fullName: setHorizontalOverflow(horizontalOverflow)
summary: >-
Represents the horizontal overflow behavior of the text frame. See `ExcelScript.ShapeTextHorizontalOverflow` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: |-
setHorizontalOverflow(
horizontalOverflow: ShapeTextHorizontalOverflow
): void;
parameters:
- id: horizontalOverflow
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextHorizontalOverflow:enum" />'
return:
type: void
description: ''
- name: setLeftMargin(leftMargin)
uid: 'ExcelScript!ExcelScript.TextFrame#setLeftMargin:member(1)'
package: ExcelScript!
fullName: setLeftMargin(leftMargin)
summary: 'Represents the left margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setLeftMargin(leftMargin: number): void;'
parameters:
- id: leftMargin
description: ''
type: number
return:
type: void
description: ''
- name: setOrientation(orientation)
uid: 'ExcelScript!ExcelScript.TextFrame#setOrientation:member(1)'
package: ExcelScript!
fullName: setOrientation(orientation)
summary: >-
Represents the angle to which the text is oriented for the text frame. See `ExcelScript.ShapeTextOrientation` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setOrientation(orientation: ShapeTextOrientation): void;'
parameters:
- id: orientation
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextOrientation:enum" />'
return:
type: void
description: ''
- name: setReadingOrder(readingOrder)
uid: 'ExcelScript!ExcelScript.TextFrame#setReadingOrder:member(1)'
package: ExcelScript!
fullName: setReadingOrder(readingOrder)
summary: >-
Represents the reading order of the text frame, either left-to-right or right-to-left. See
`ExcelScript.ShapeTextReadingOrder` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setReadingOrder(readingOrder: ShapeTextReadingOrder): void;'
parameters:
- id: readingOrder
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextReadingOrder:enum" />'
return:
type: void
description: ''
- name: setRightMargin(rightMargin)
uid: 'ExcelScript!ExcelScript.TextFrame#setRightMargin:member(1)'
package: ExcelScript!
fullName: setRightMargin(rightMargin)
summary: 'Represents the right margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setRightMargin(rightMargin: number): void;'
parameters:
- id: rightMargin
description: ''
type: number
return:
type: void
description: ''
- name: setTopMargin(topMargin)
uid: 'ExcelScript!ExcelScript.TextFrame#setTopMargin:member(1)'
package: ExcelScript!
fullName: setTopMargin(topMargin)
summary: 'Represents the top margin, in points, of the text frame.'
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setTopMargin(topMargin: number): void;'
parameters:
- id: topMargin
description: ''
type: number
return:
type: void
description: ''
- name: setVerticalAlignment(verticalAlignment)
uid: 'ExcelScript!ExcelScript.TextFrame#setVerticalAlignment:member(1)'
package: ExcelScript!
fullName: setVerticalAlignment(verticalAlignment)
summary: Represents the vertical alignment of the text frame. See `ExcelScript.ShapeTextVerticalAlignment` for details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: |-
setVerticalAlignment(
verticalAlignment: ShapeTextVerticalAlignment
): void;
parameters:
- id: verticalAlignment
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextVerticalAlignment:enum" />'
return:
type: void
description: ''
- name: setVerticalOverflow(verticalOverflow)
uid: 'ExcelScript!ExcelScript.TextFrame#setVerticalOverflow:member(1)'
package: ExcelScript!
fullName: setVerticalOverflow(verticalOverflow)
summary: >-
Represents the vertical overflow behavior of the text frame. See `ExcelScript.ShapeTextVerticalOverflow` for
details.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'setVerticalOverflow(verticalOverflow: ShapeTextVerticalOverflow): void;'
parameters:
- id: verticalOverflow
description: ''
type: '<xref uid="ExcelScript!ExcelScript.ShapeTextVerticalOverflow:enum" />'
return:
type: void
description: ''