Click or drag to resize

XlsRange HorizontalAlignment Property

Returns or sets the horizontal alignment for the specified object.
Examples
The following code illustrates how to set and access HasStyle property:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["A1"].Text = "Test";</para><para>//Set alignment</para><para>worksheet["A1"].HorizontalAlignment = HorizontalAlignType.Right;</para><para>//Save to file</para><para>workbook.SaveToFile("HorizontalAlignment.xlsx");</para>

Namespace: Spire.Xls.Core.Spreadsheet
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public HorizontalAlignType HorizontalAlignment { get; set; }

Property Value

Type: HorizontalAlignType

Implements

IXLSRange HorizontalAlignment
See Also