SetAlignVertical

SetAlignVertical(sAligment) → { boolean }

Sets the vertical alignment of the text in the current cell range.

Parameters:

Name Type Description
sAligment 'center' | 'bottom' | 'top' | 'distributed' | 'justify'

The vertical alignment that will be applied to the cell contents.

Returns:

Type
boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1:D5");
oWorksheet.GetRange("A2").SetValue("This is just a sample text distributed in the A2 cell.");
oRange.SetAlignVertical("distributed");
builder.SaveFile("xlsx", "SetAlignVertical.xlsx");
builder.CloseFile();

Resulting document