Click or drag to resize

IXLSRange Columns Property

For a Range object, returns an array of Range objects that represent the columns in the specified range.
Examples
The following code illustrates how to access columns:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set columns</para><para>IXLSRange[] columns = worksheet["A1:E8"].Columns;</para><para>//Do some manipulations</para><para>foreach (IXLSRange column in columns)</para><para>column.Text = column.RangeAddressLocal;</para><para>//Save to file</para><para>workbook.SaveToFile("Columns.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
IXLSRange[] Columns { get; }

Property Value

Type: IXLSRange
See Also