Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListXlExportOptions.SuppressMaxColumnCountError Property

Specifies whether to suppress the exception thrown when exporting more than 256 columns to an XLS file or more than 16,384 columns to an XLSX file.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(false)]
public bool SuppressMaxColumnCountError { get; set; }

#Property Value

Type Default Description
Boolean false

true to suppress the exception and export the maximum available number of columns; false to cancel the export and throw the exception.

#Remarks

The Microsoft Excel data formats impose the following limitations on the total number of rows and columns in a worksheet:

File format XLS XLSX
Total number of columns 256 16,384
Total number of rows 65,536 1,048,576

If the number of exported rows or columns exceeds the predefined limit, the TreeList throws an exception and cancels the export operation.

Set the SuppressMaxColumnCountError property to true to suppress the exception and export the maximum available number of columns. Extra columns are not exported.

C#
async Task ExportXlsx_Click() {
    await MyTreeList.ExportToXlsxAsync("ExportResult", new TreeListXlExportOptions() {
        SuppressMaxColumnCountError = true
    });
}

To suppress the maximum row count exception, use the SuppressMaxRowCountError property.

See Also