Get Started
Documentation

SetAlignVertical

SetAlignVertical(value)

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

Parameters:

Name Type Description
value "center" | "bottom" | "top" The parameters will define the vertical alignment that will be applied to the cell contents.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var sRange = oWorksheet.GetRange("A1:D5");
oWorksheet.GetRange('A2').SetValue('2'); 
sRange.SetAlignVertical("top");
builder.SaveFile("xlsx", "SetAlignVertical.xlsx");
builder.CloseFile();

Resulting document