Skip to main content

XlTableReference(IXlTable, String, String) Constructor

Initializes a new instance of the XlTableReference class with the specified settings.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public XlTableReference(
    IXlTable table,
    string firstColumnName,
    string lastColumnName
)

Parameters

Name Type Description
table IXlTable

An IXlTable object that specifies the referenced table. This value is assigned to the XlTableReference.Table property.

firstColumnName String

A string that is the name of the column specifying the left bound of the referenced data range. This value is assigned to the XlTableReference.FirstColumn property.

lastColumnName String

A string that is the name of the column specifying the right bound of the referenced data range. This value is assigned to the XlTableReference.LastColumn property.

Remarks

Use this constructor to create a reference to the contiguous data range between the specified columns, including these columns. The column header and total cells are not included in the reference.

For example, the following code creates a reference to the data of columns between “Q1” and “Q4”, which is the cell range B2:E5 (see the image below the code snippet).

XlTableReference reference = new XlTableReference(table, "Q1", "Q4");

XlExport_TableReference_AdjacentColumnData

See Also