Skip to main content

XlTableReference(IXlTable, String, String, XlTablePart) Constructor

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

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

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

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 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 range. This value is assigned to the XlTableReference.LastColumn property.

part XlTablePart

An XlTablePart enumeration member that specifies the part of the table to use in the reference. This value is assigned to the XlTableReference.Part property.

Remarks

Use this constructor to create a reference to a specific portion of the table between two columns, including these columns.

For example, the following code creates a reference to the totals of the “Q1” through “Q4” columns, which is the cell range B6:E6 (see the image below the code snippet).

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

XlExport_TableReference_ColumnTotals

See Also