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 });

 

posted on 2016-05-15 09:03  武胜-阿伟  阅读(803)  评论(0编辑  收藏  举报