Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IRange Interface : VerticalAlignment Property

VerticalAlignment Property (IRange)

Gets or sets the vertical alignment of the Range.
Syntax
'Declaration
 
Property VerticalAlignment As ExcelVAlign
'Usage
 
Dim instance As IRange
Dim value As ExcelVAlign
 
instance.VerticalAlignment = value
 
value = instance.VerticalAlignment
ExcelVAlign VerticalAlignment {get; set;}
Example
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Set text
            worksheet["A1"].Text = "Test";
            
            //Set alignment
            worksheet["A1"].VerticalAlignment = ExcelVAlign.VAlignTop;
            
            //Set row height
            worksheet["A1"].RowHeight = 30;
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close(); 
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also