AR13模板制作预览正常,导出PDF正常,但是导出excel,数据异常
模板设计:
excel导出:
DirectoryInfo outputDirectory = new DirectoryInfo(HttpRuntime.AppDomainAppPath + "temFile\\");
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings excelSetting = new GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtensionSettings();
excelSetting.FileFormat = GrapeCity.ActiveReports.Export.Excel.Page.FileFormat.Xlsx;
excelSetting.MultiSheet = false;
excelSetting.Pagination = false;
GrapeCity.ActiveReports.Extensibility.Rendering.ISettings setting = excelSetting;
GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension excelRenderingExtension = new GrapeCity.ActiveReports.Export.Excel.Page.ExcelRenderingExtension();
GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider outputProvider = new GrapeCity.ActiveReports.Rendering.IO.FileStreamProvider(outputDirectory, FileName);
outputProvider.OverwriteOutputFile = true;
rpt.Document.Render(excelRenderingExtension, outputProvider, setting.GetSettings());
reportPath = HttpRuntime.AppDomainAppPath + "temFile\\" + FileName + ".xlsx";
|