Exporting Several XtraGrid Controls to a Single Excel File

前端 未结 3 1025
隐瞒了意图╮
隐瞒了意图╮ 2020-12-20 06:02

I\'ve got several XtraGrid Controls each one containing different information, I get some information about the way in which you can export a XtraGrid to an Excel file in th

3条回答
  •  庸人自扰
    2020-12-20 06:27

    To do that you will want to add a printableComponentLink to each gridControl, and then Create a compositeLink that you can add each of the printableComponent links to.

    This link may prove DevExpress KB Article may prove useful as it has an example of that.

    Then you will use the compositeLink.ExportToXlsx method. If you create XlsxExportOptions with the XlsxExportOptions.ExportMode property equal to SingleFilePageByPage and pass it to the CompositeLink.ExportToXlsx method, every page will be exported to a separate sheet.

提交回复
热议问题