gridview转成EXCEL文件保存(多页)

CompositeLink complink = new CompositeLink(new PrintingSystem());
            PrintableComponentLink link = new PrintableComponentLink();
            link.Component = gridControl1;
            complink.Links.Add(link);
            //...
            complink.CreatePageForEachLink();
            complink.ExportToXlsx("test.xlsx", new XlsxExportOptions() { ExportMode = XlsxExportMode.SingleFilePageByPage });

 

你可能感兴趣的:(gridview转成EXCEL文件保存(多页))