SetAlignVertical
Sets the vertical alignment of the text in the current cell range.
Syntax
expression.SetAlignVertical(sAligment);
expression
- A variable that represents a ApiRange class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sAligment | Required | 'center' | 'bottom' | 'top' | 'distributed' | 'justify' | The vertical alignment that will be applied to the cell contents. |
Returns
boolean
Example
This example sets the vertical alignment of the text in the cell range.
- Code
- Result
let worksheet = Api.GetActiveSheet();
let range = worksheet.GetRange("A1:D5");
worksheet.GetRange("A2").SetValue("This is just a sample text distributed in the A2 cell.");
range.SetAlignVertical("distributed");