SetAlignVertical

function SetAlignVertical(sAligment: center | bottom | top | distributed | justify = null): boolean

Description

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

Parameters

sAligmentcenter | bottom | top | distributed | justifydefault: null

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

Returns

boolean

Try It

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");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).