public void CreateReport(IExcelReport report) { var templateFullpath = Path.Combine(Environment.CurrentDirectory, templateFilename); if (!File.Exists(templateFullpath)) { throw new ApplicationException($"Файл-шаблон отчета не существует или не задан ({templateFullpath})"); } try { using (var application = new Application()) { using (var workbook = application.Workbooks.Add(templateFullpath)) { report.ExportToExcel(workbook); } application.Visible = true; } } catch (Exception ex) { throw new SystemException("Ошибка экспорта платежей ЭЭ в документ Excel", ex); } }
public ExcelTableReport(string reportName, IEnumerable <Doc> docs, BizTableReport reportData) { _report = new ExcelReport(reportName, "Empty", "Отчет"); _enumRepository = new EnumRepository(); CreateReport(reportName, docs, reportData); }
public ExcelDocListReport(string reportName, IEnumerable <Doc> docs, Doc docTemplate) { _report = new ExcelReport(reportName, "Empty", "Отчет"); _enumRepository = new EnumRepository(); CreateReport(reportName, docs, docTemplate); }
DownloadFileInfo GetReportFileInfo(String reportCode) { IExcelReport report = ExcelReportAssembly.LoadReport(reportCode); report.Render(); return(report.GetDownloadFileInfo()); }
public ExcelTableReport(IExcelReport report, IEnumRepository enumRepository) { _report = report; _enumRepository = enumRepository; }
public ExcelDocListReport(IExcelReport report, IEnumRepository enumRepository) { _report = report; _enumRepository = enumRepository; }