Skip to main content
All docs
V24.2

TreeListXlExportOptions.CountBlankCellsInSummary Property

Specifies whether the Count summary function takes blank cells into account when exporting data in Excel formats.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(false)]
public bool CountBlankCellsInSummary { get; set; }

Property Value

Type Default Description
Boolean false

true to count non-blank and blank cells; false to count non-blank cells only.

Remarks

The Count summary function in the source TreeList component calculates the number of data rows (regardless whether row values are empty).

When you export the summary to XLS or XLSX, the Count function in Excel calculates the number of non-blank cells only.

Set the CountBlankCellsInSummary property to true to take blank and non-blank cells into account in the resulting document.

<DxButton Text="Export to XLSX" Click="ExportXlsx_Click" />

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId" @ref="MyTreeList">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

@code {
    ITreeList MyTreeList { get; set; }

    async Task ExportXlsx_Click() {
        await MyTreeList.ExportToXlsxAsync("ExportResult", new TreeListXlExportOptions() {
            CountBlankCellsInSummary = true
        });
    }
}
See Also