Back to Devexpress

XlsExportOptionsEx.SkipFooterRow Event

corelibraries-devexpress-dot-xtraprinting-dot-xlsexportoptionsex-1212290c.md

latest2.7 KB
Original Source

XlsExportOptionsEx.SkipFooterRow Event

Allows you to hide certain summary footers (or certain multi-line summary footers’ lines) from the exported document.Only available in data-aware export mode.

Namespace : DevExpress.XtraPrinting

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

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public event SkipFooterRowEventHandler SkipFooterRow
vb
Public Event SkipFooterRow As SkipFooterRowEventHandler

Remarks

The SkipFooterRow event fires repeatedly when exporting each group summary footer and total summary footer. If a footer consists of multiple lines, the SkipFooterRow event fires for each of these lines.

The event’s parameters allow you to identify the currently processed footer (or a line within a footer). To hide a footer (its line) from the export output, set the SkipFooterRow property to true.

Example

The following example exports a Data Grid to XLSX format while hiding group summary footers (if any) in the export output.

csharp
private void btnExport_Click(object sender, EventArgs e) {
    string path = "grid-export.xlsx";
    XlsxExportOptionsEx options = new XlsxExportOptionsEx();
    options.SkipFooterRow += Options_SkipFooterRow;
    gridView1.ExportToXlsx(path, options);
}

// Hide group summary footers 
private void Options_SkipFooterRow(DevExpress.Export.SkipFooterRowEventArgs e) {
    if (e.AreaType== DevExpress.Export.SheetSkipRowAreaType.GroupFooter)
        e.SkipFooterRow = true;
}
vb
Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click
    Dim path As String = "grid-export.xlsx"
    Dim options As New XlsxExportOptionsEx()
    AddHandler options.SkipFooterRow, AddressOf Options_SkipFooterRow
    GridView1.ExportToXlsx(path, options)
End Sub

' Hide group summary footers 
Private Sub Options_SkipFooterRow(e As DevExpress.Export.SkipFooterRowEventArgs)
    If e.AreaType = DevExpress.Export.SheetSkipRowAreaType.GroupFooter Then
        e.SkipFooterRow = True
    End If
End Sub

See Also

XlsExportOptionsEx Class

XlsExportOptionsEx Members

DevExpress.XtraPrinting Namespace