无法对导出的 DevExpress 网格 Excel 中的整列应用过滤器

Cannot apply filter on whole columns in Excel of exported DevExpress grid

我在 Excel 中导出了 DevExpress 网格。我希望能够对导出的 Excel sheet 应用 Excel 过滤器。现在,Excel 导出只允许我对深灰色行(已经包含总和的行)之间的值应用过滤器。看照片。 (这可能是因为格式中发生的单元格合并吗?) 我正在使用以下方法导出:

Using link As New PrintableComponentLink(New PrintingSystem())

                Dim options As New XlsxExportOptionsEx
                options.ExportType = DevExpress.Export.ExportType.DataAware
                options.TextExportMode = TextExportMode.Value 'Should set to Value to be able to have the numbers displayed as numbers instead of text.
                options.AllowCellMerge = DefaultBoolean.False

                link.Component = gcInvisibleDetail
                link.CreateDocument(link.PrintingSystem)
                link.ExportToXlsx(tbRepertoire.Text & "\Charges.xlsx", options)

End Using

过滤器无法应用于整列,因为在您的示例中,组页脚行 7、9、15 和 17 的顶部和底部有一个小缩进,Excel 中的空行模拟这些缩进。

添加这些行是为了支持网格导出的所见即所得原则。

您可以查看此主题:

Problem with XtraGrid Group Footer rending when exporting to excel