Skip to main content

IXlTable.GetReference(XlTablePart, String, String) Method

Returns a reference to the specified part of the table bounded by the specified columns.

Namespace: DevExpress.Export.Xl

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

NuGet Package: DevExpress.Printing.Core

Declaration

XlTableReference GetReference(
    XlTablePart part,
    string firstColumnName,
    string lastColumnName
)

Parameters

Name Type Description
part XlTablePart

An XlTablePart enumeration member that specifies the part of the table to use in the reference.

firstColumnName String

A string that is the name of the column specifying the left bound of the referenced table range.

lastColumnName String

A string that is the name of the column specifying the right bound of the referenced table range.

Returns

Type Description
XlTableReference

An XlTableReference object that specifies the created reference.

Remarks

Use this method 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 = table.GetReference(XlTablePart.Totals, "Q1", "Q4");

XlExport_TableReference_ColumnTotals

See Also