private byte[] ReporteRegistro(List <M_RegistroExcel> reporte) { try { M_Excel excelNew = new M_Excel(); M_Worksheet workSheet = new M_Worksheet { Header = "Reporte de Registros", Data = DTHelper.ToDataTable(reporte), }; workSheet.Columns.Add(new M_Column(0, "TipoRegistro", "Tipo de Registro")); workSheet.Columns.Add(new M_Column(1, "Categoria", "Categoría")); workSheet.Columns.Add(new M_Column(2, "SubCategoria", "Subcategoría")); workSheet.Columns.Add(new M_Column(3, "Moneda", "Moneda")); workSheet.Columns.Add(new M_Column(4, "Importe", "Importe")); workSheet.Columns.Add(new M_Column(5, "Fecha", "Fecha", typeof(DateTime))); workSheet.Columns.Add(new M_Column(6, "Descripcion", "Descripción")); excelNew.WorksheetList.Add(workSheet); return(ExcelExportHelper.ExportExcel(excelNew)); } catch (Exception ex) { throw ex; } }
private byte[] ReporteObjetivo(List <M_ObjetivoExcel> reporte) { try { M_Excel excelNew = new M_Excel(); M_Worksheet workSheet = new M_Worksheet { Header = "Reporte de Objetivos", Data = DTHelper.ToDataTable(reporte), }; workSheet.Columns.Add(new M_Column(0, "Motivo", "Motivo")); workSheet.Columns.Add(new M_Column(1, "EstadoObjetivo", "Estado")); workSheet.Columns.Add(new M_Column(4, "Moneda", "Moneda")); workSheet.Columns.Add(new M_Column(5, "Importe", "Importe")); workSheet.Columns.Add(new M_Column(6, "FechaVencimiento", "Fecha de Vencimiento", typeof(DateTime))); workSheet.Columns.Add(new M_Column(7, "Descripcion", "Descripción")); excelNew.WorksheetList.Add(workSheet); return(ExcelExportHelper.ExportExcel(excelNew)); } catch (Exception ex) { throw ex; } }