public HttpResponseMessage ExportarXLS(int codOficina, string dia) { DateTime elDia = Convert.ToDateTime(dia); var ingLc = IngresolicenciaDataAccess.ObtenerEntidadesByOficinaXLS(codOficina, elDia); Columna[] columns = { new Columna("FolioLicencia", "Folio LM"), new Columna("RutAfiliado", "Rut Afiliado"), new Columna("NombreAfiliado", "Nombre Afiliado"), new Columna("FechaIngreso", "Fecha Ingreso"), new Columna("RutEjecutivo", "Rut Ejecutivo"), new Columna("NombreEjecutivo", "Nombre Ejecutivo"), new Columna("SinDatosEnSistema", "Sin datos en sistema"), new Columna("SucursalDestino", "Sucursal Destino") }; byte[] filecontent = ExcelExportHelper.ExportExcel(ingLc, "LM Ingresadas al " + dia, true, columns); HttpResponseMessage response = new HttpResponseMessage(); Stream stri = new MemoryStream(filecontent); response.Content = new StreamContent(stri); response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = "LM_Ingresadas_" + dia.Replace("-", "_").Replace("/", "_") + ".xls"; response.Content.Headers.ContentType = new MediaTypeHeaderValue(ExcelExportHelper.ExcelContentType); response.Content.Headers.ContentLength = stri.Length; return(response); }
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; } }
/// <summary> /// Reporte 2. Devuelve los datos de los bancos y agencias /// </summary> /// <returns></returns> public FileContentResult R2zJ2UHV() { try { string TituloWorksheet = "Cuentas por Mision"; string NombreFileExcel = "CuentasPorMision.xlsx"; List <BancoCuentaMisionXls> Bancos = new List <BancoCuentaMisionXls>(); Bancos = new BLBanco().ExpBancoAgenciaCuentaMision().ToList(); string[] columns = { "OrganoServicio", "Cuenta", "Banco", "Agencia", "Domicilio1", "Domicilio2", "Tipo", "Pais", "Situacion" }; if (Bancos.Count > 0) { byte[] filecontent = ExcelExportHelper.ExportExcel( Bancos, TituloWorksheet, String.Format("Exportado por {0} el {1} a las {2}.", User.Usuario, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString()), true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, NombreFileExcel)); } else { return(File(Encoding.UTF8.GetBytes("No hay datos"), "text/plain", string.Format("Reporte.txt"))); } } catch (Exception ex) { AddToastMessage("Sesion registrada", "Ha intentado acceder a una ubicación no permitida para su perfil.", BootstrapAlertType.danger); throw ex; } }
public HttpResponseMessage descargarExcel5disponiblesAPago(int re, int of) { var dataExp = GeneralesData.ListarObjetosDisponibleApago(re, of); Columna[] columns = { new Columna("Afiliado_Rut", "Rut Afiliado"), new Columna("Afiliado_Dv", "Dv Afiliado"), new Columna("Afiliado_Nombre", "Nombre Afiliado"), new Columna("Licencia_Folio", "Folio LM"), new Columna("Fecha_Inicio", "Fecha Inicio"), new Columna("Fecha_Termino", "Fecha Término"), new Columna("Licencia_Dias", "Dias LM"), new Columna("Dias_Pago", "Dias a Pago"), new Columna("Monto_Pago", "Monto a Pago"), new Columna("Mes_Prescripcion", "Periodo Expira"), }; byte[] filecontent = ExcelExportHelper.ExportExcel(dataExp, "Disponibles a Pago.", false, columns); HttpResponseMessage response = new HttpResponseMessage(); Stream stri = new MemoryStream(filecontent); response.Content = new StreamContent(stri); response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment"); response.Content.Headers.ContentDisposition.FileName = "Disponibles_a_pago_SIL_" + re + ".xlsx"; response.Content.Headers.ContentType = new MediaTypeHeaderValue(ExcelExportHelper.ExcelContentType); response.Content.Headers.ContentLength = stri.Length; return(response); }
protected void ExportToExcelButtonOnClick(object sender, EventArgs e) { string[] columns = { "MonthName", "Inventory", "Utilization", "TicketsSold", "TicketsRedeemed", "TicketsExpired","TicketsRefunded", "GrossSales", "NetSales", "NetRevenue", "AvgIncrementalRevenue", "PercentSold", "PercentRedeemed", "PercentExpired","PercentRefunded" }; _result = _bookingRepository.GetSalesReportByHotelId(PublicHotel.HotelId, PublicHotel.TimeZoneId, int.Parse(YearDdl.SelectedValue)); byte[] filecontent = ExcelExportHelper.ExportExcel(_result, columns); var fileName = string.Format("SalesReport_{2}_{0}_{1:yyyyMMdd}.xlsx", PublicHotel.HotelName.Replace(" ", "_"), DateTime.Now, YearDdl.SelectedValue); using (var writer = new BinaryWriter(File.OpenWrite(Server.MapPath(string.Format("/Helper/{0}", fileName))))) { writer.Write(filecontent); writer.Flush(); writer.Close(); } Response.ContentType = ExcelExportHelper.ExcelContentType; Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName); Response.TransmitFile(Server.MapPath("~/Helper/" + fileName)); Response.End(); }
public async Task <FileContentResult> ExportToExcel(char tabIndex) { var filter = new FilterModel { CompId = CurrentUser.CompanyId, tabIndex = tabIndex, IsExport = true }; var response = await _centerRepo.GetCallDetails(filter); byte[] filecontent; string[] columns; if (tabIndex == 'P') { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNumber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPincode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "PurchaseFrom", "ServiceCenterName" }; filecontent = ExcelExportHelper.ExportExcel(response.PendingCalls, "", true, columns); } else if (tabIndex == 'A') { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNumber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPincode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "PurchaseFrom", "ServiceCenterName" }; filecontent = ExcelExportHelper.ExportExcel(response.AcceptedCalls, "", true, columns); } else { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNumber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPincode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "PurchaseFrom", "ProviderName", "ServiceCenterName" }; filecontent = ExcelExportHelper.ExportExcel(response.AssignedCalls, "", true, columns); } return(File(filecontent, ExcelExportHelper.ExcelContentType, "Excel.xlsx")); }
public ActionResult ExportToExcel() { //Get the data from database into datatable var leads = from s in db.Leads where s.isDeleted == false select new { Email_Sent_Date = s.EmailDate, Source = s.Source, Date_of_Request = s.RequestDate, Case_Attended_By = s.CaseAttendedBy, Client_Name = s.ClientName, Company_Name = s.CompanyName, Email_Address = s.Email, Contact_Number_1 = s.ContactNumber1, Contact_Number_2 = s.ContactNumber2, Service_Request = s.ServiceRequester.ServiceName, Country_License_Type = s.CountryLicense.CountryLicenseTypeName, Follow_Up_Date = s.FollowUpDate, Follow_Up_Date2 = s.FollowUpDate2, Remarks = s.Remarks }; var list_leads = leads.ToList(); byte[] filecontent = ExcelExportHelper.ExportExcel(list_leads, "Leads"); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Leads.xlsx")); }
public FileContentResult SubscriptionExportToExcel(int?customerId, int?custtype, DateTime?effectivedate, string cTypetext = "", string statustext = "", string Location = "", int status = 1, int pageNo = 1, int pageSize = 0) { MainViewModel.SubscriptionViewModel customerViewModel = new MainViewModel.SubscriptionViewModel(); var suscriberList = suscription.getSuscriberList(customerId, custtype, effectivedate, pageNo, pageSize, Location, status); var subscriptionExcelList = suscriberList.Select(x => new ExcelViewModel.SubscriptionExcelViewModel() { custno = x.CustNo, SubsNo = x.SubsNo, CustomerName = x.CustomerName, LocationName = x.LocationName, EffectiveDate = x.EffectiveDate, LedgerName = x.LedgerName, MonthlyAmount = x.MonthlyAmount, Status = x.Status }).ToList(); if (cTypetext == "--Select Event--") { cTypetext = ""; } string[] columns = { "Customer No", "Subscription No.", "Customer Name", "LocationName", "Effective Date", "Ledger Name", "Monthly Amount", "Status" }; string[] parameterSearch = { "Location.:" + Location, "Effective Date:" + effectivedate, "Customer Type:" + cTypetext, "Status:" + statustext }; byte[] fileContent = ExcelExportHelper.ExportExcel(subscriptionExcelList, parameterSearch, null, "Subscription Report", columns); return(File(fileContent, ExcelExportHelper.ExcelContentType, "Subscription Report.xlsx")); }
public FileContentResult SubmitFormReportExport() { AccruedService service = new AccruedService(); //DataTable dt = service.ExportReport(); //string g = ""; var dt = new System.Data.DataTable("test"); dt.Columns.Add("col1", typeof(int)); dt.Columns.Add("col2", typeof(string)); dt.Rows.Add(1, "product 1"); dt.Rows.Add(2, "product 2"); dt.Rows.Add(3, "product 3"); dt.Rows.Add(4, "product 4"); dt.Rows.Add(5, "product 5"); dt.Rows.Add(6, "product 6"); dt.Rows.Add(7, "product 7"); string[] columns = dt.Columns.Cast <DataColumn>() .Select(x => x.ColumnName) .ToArray(); byte[] filecontent = ExcelExportHelper.ExportExcel(dt, "Technology", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Technologies.xlsx")); }
public void GenerarExcel(int mes, int anio, int idIndicador, List <MedicionResultDTO> mediciones) { string archivo = ObtenerPathArchivoCompleto(anio, mes, idIndicador); if (!File.Exists(archivo)) { if (mediciones == null) { mediciones = (List <MedicionResultDTO>)ObtenerDetallesMediciones(mes, anio); } List <MedicionExportarDTO> medicionesExportar = (List <MedicionExportarDTO>)AutoMapper.Mapper.Map <IList <MedicionExportarDTO> >(mediciones); try { string mesStr = EnumHelper <Enums.Enum.Mes> .Parse(mes.ToString()).ToString(); string[] columnas = GetColumnasExportacion(); string titulo = GetTituloExportacion(mesStr, anio.ToString()); FileStream fs = File.Create(archivo); byte[] filecontent = ExcelExportHelper.ExportExcel(medicionesExportar, titulo, false, columnas); fs.Write(filecontent, 0, filecontent.Length); fs.Close(); } catch (Exception ex) { LogHelper.LogException(ex); } } }
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; } }
public FileContentResult SubscriptionStatementExportToExcel(DateTime?FromDate, DateTime?ToDate, int?subsid, string substext = "") { int pageNo = 1; int pageSize = 0; MainViewModel.SubscriptionReport subscriptionViewModel = new MainViewModel.SubscriptionReport(); var suscriberList = reportService.getSubscriberStatementList(subsid, FromDate, ToDate, pageNo, pageSize); var subscriptionExcelList = suscriberList.Select(x => new ExcelViewModel.SubscriptionReportExcel() { custNo = x.CustNo, SubsNo = x.SubsNo, Custname = x.Custname, Debit = x.Debit, Credit = x.Credit, Balance = x.Balance, PostedOnAd = x.PostedOnAd, PostedOnBs = x.PostedOnBs, Sources = x.Sources }).ToList(); string[] columns = { "Customer No", "Subscription No.", "Customer Name", "Debit", "Credit", "Balance", "Posted On Ad", "Posted On Bst", "Sources" }; string[] parameterSearch = { "From Date.: " + FromDate, "To Date.: " + ToDate, "Customer Name: " + substext }; byte[] fileContent = ExcelExportHelper.ExportExcel(subscriptionExcelList, parameterSearch, null, "Subscription Report", columns); return(File(fileContent, ExcelExportHelper.ExcelContentType, "Subscription Report.xlsx")); }
public async Task <FileContentResult> ExportToExcel(char tabIndex) { var filter = new FilterModel { CompId = CurrentUser.CompanyId , tabIndex = tabIndex, UserId = CurrentUser.UserId, Type = tabIndex }; var response = await _customerSupport.GetASPCalls(filter); var OtherRes = new List <UploadedExcelModel>(); filter.Type = tabIndex; if (tabIndex != 'P') { OtherRes = await _RepoCallLog.GetExclatedCalls(filter); } byte[] filecontent; string[] columns; if (tabIndex == 'P') { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNuber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPinCode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "DevicePurchaseFrom" }; filecontent = ExcelExportHelper.ExportExcel(response.PendingCalls, "", true, columns); } else if (tabIndex == 'A') { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNuber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPinCode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "DevicePurchaseFrom" }; filecontent = ExcelExportHelper.ExportExcel(OtherRes, "", true, columns); } else if (tabIndex == 'E') { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNuber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPinCode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "DevicePurchaseFrom" }; filecontent = ExcelExportHelper.ExportExcel(OtherRes, "", true, columns); } else if (tabIndex == 'C') { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNuber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPinCode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "DevicePurchaseFrom" }; filecontent = ExcelExportHelper.ExportExcel(OtherRes, "", true, columns); } else { columns = new string[] { "CRN", "ClientName", "CreatedOn", "ServiceTypeName", "CustomerName", "CustomerContactNuber", "CustomerEmail", "CustomerAddress", "CustomerCity", "CustomerPinCode", "DeviceCategory", "DeviceBrand", "DeviceModel", "DOP", "DevicePurchaseFrom", "ProviderName" }; filecontent = ExcelExportHelper.ExportExcel(response.AllocatedCalls, "", true, columns); } return(File(filecontent, ExcelExportHelper.ExcelContentType, "Excel.xlsx")); }
public FileContentResult ExportToExcelOOXML() { var data = db.Employee.ToList(); string[] columns = { "Name", "Project", "Developer" }; byte[] filecontent = ExcelExportHelper.ExportExcel(data, "Technology", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Technologies.xlsx")); }
public FileResult ExcelExport(string token, long shopId) { var list = GetFoodMapList(token, shopId); string[] columns = { "Token", "CateId", "CateName", "ItemId", "ItemName", "SpecId", "SpecName", "Price", "Price", "ProdNo", "ProdName", "ProdUnit", "SalePrice" }; byte[] filecontent = ExcelExportHelper.ExportExcel(list, "", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "商品映射信息.xlsx")); }
public FileContentResult ExportToExcel() { string[] columns = { "Name", "Location", "Type", "State", "KWh", "DateTime" }; byte[] filecontent = ExcelExportHelper.ExportExcel(apiController.logList, "Device Log", true, columns); String date = DateTime.Now.ToString("dd-MM-yyyy"); return(File(filecontent, ExcelExportHelper.ExcelContentType, "DeviceLog-" + date + ".xlsx")); }
public ActionResult Get() { List <Student> lstStudent = StaticDataOfStudent.ListStudent; string[] columns = { "ID", "Name", "Age", "Gender" }; byte[] filecontent = ExcelExportHelper.ExportExcel(lstStudent, "Sheet1", columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "MyStudent.xlsx")); }
public FileContentResult ExportToExcel() { List <Technology> technologies = StaticData.Technologies; string[] columns = { "Name", "Project", "Developer" }; byte[] filecontent = ExcelExportHelper.ExportExcel(technologies, "Technology", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Technologies.xlsx")); }
public FileContentResult ExportToExcel() { List <Newsletter> savedUserNewsletters = EpPlusExcelStaticList.SavedUserNewsletters; string[] columns = { "Email", "UnscribeCode", "UnscribeLink" }; byte[] filecontent = ExcelExportHelper.ExportExcel(savedUserNewsletters, "Newsletter", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "NewsletterListEmail.xlsx")); }
/// <summary> /// 导出excel /// </summary> /// <returns></returns> public FileContentResult ExportToExcel() { List <Student> news = db.Student.ToList(); string[] columns = { "编号", "学号", "姓名", "性别", "照片", "密码", "身份证", "民族", "籍贯", "政治面貌", "手机号", "入学年份", "学籍状态" }; byte[] filecontent = ExcelExportHelper.ExportExcel(news, "", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "MyStudent.xlsx")); }
//导出 public FileContentResult ExportToExcel() { List <Student> lstStudent = StaticDataOfStudent.ListStudent; string[] columns = { "ID", "Name", "Age" }; byte[] filecontent = ExcelExportHelper.ExportExcel(lstStudent, "", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "MyStudent.xlsx")); }
public FileContentResult ExportToExcel() { List <Ent_Inventario_Consulta> list = (List <Ent_Inventario_Consulta>)Session[_session_tabla_inventCons_private]; string[] columns = { "des_entid", "articulo", "calidad", "talla", "teorico", "fisico", "diferencia", "nombres_venta", "fecha_inv" }; byte[] filecontent = ExcelExportHelper.ExportExcel(list, "Inventario_Consulta", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Inventario_Consulta.xlsx")); }
public FileContentResult ExportToExcel() { var contato = HttpContext.Session.GetObjectFromJson <List <Contato> >("SessionContato"); //List<Technology> technologies = StaticData.Technologies; string[] columns = { "Codigo CNPJ", "Empresa", "Contato", "CPF", "Tel.Residencial", "Tel.Celular", "Email", "Area Atuação" }; byte[] filecontent = ExcelExportHelper.ExportExcel(contato, "Contatos", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Contatos.xlsx")); }
public async Task <FileContentResult> ExportToExcel(Char tabIndex) { var filter = new FilterModel { CompId = CurrentUser.CompanyId, tabIndex = tabIndex }; byte[] filecontent; string[] columns; if (tabIndex == 'T') { columns = new string[] { "ServiceProviderName" , "OrganizationName", "OrganizationCode", "OrganizationIECNumber", "StatutoryType", "ApplicableTaxType", "GSTCategory", "GSTNumber", "PANCardNumber", "IsServiceCenter", "ContactName", "ContactMobile", "ContactEmail", "ContactPAN", "ContactVoterId", "ContactAdhaar", "AddressType", "Country", "State", "City", "Address", "Locality", "NearByLocation", "PinCode", "IsUser" }; var providerData = new List <serviceProviderData> { new serviceProviderData { ServiceProviderName = "Ambica services", OrganizationName = "Ambica Service PVT LTD", OrganizationCode = "ORG000015", OrganizationIECNumber = "IEC55588455", StatutoryType = "Private Limited", ApplicableTaxType = "Indian GST", GSTCategory = "Services", GSTNumber = "33ABCDE1234E1ZI", PANCardNumber = "AYJPK5904C", IsServiceCenter = "Yes", ContactName = "Gaurab Sharma", ContactMobile = "8557854455", ContactEmail = "*****@*****.**", ContactPAN = "AYJP5904C", AddressType = "Home", Country = "India", State = "Uttar Pradesh", City = "GAUTAM BUDDHA NAGAR", Address = "Address", Locality = "Noida", NearByLocation = "Kailash Hospital", PinCode = "201301", IsUser = "******" } }; filecontent = ExcelExportHelper.ExportExcel(providerData, "", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "ASPTemplate.xlsx")); } else { var response = await _provider.GetProvidersExcel(filter); columns = new string[] { "ServiceProviderCode", "ServiceProviderName" , "OrganizationName", "OrganizationCode", "OrganizationIECNumber", "StatutoryType", "ApplicableTaxType", "GSTCategory", "GSTNumber", "PANCardNumber", "IsServiceCenter", "ContactName", "ContactMobile", "ContactEmail", "ContactPAN", "ContactVoterId", "ContactAdhaar", "AddressType", "Country", "State", "City", "Address", "Locality", "NearByLocation", "PinCode", "IsUser", "ServiceableAreaPinCode" }; filecontent = ExcelExportHelper.ExportExcel(response, "", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "ProviderData.xlsx")); } }
public FileContentResult ExportToExcel() { List <InventoryItem> ReadyToexport = new List <InventoryItem>(); ReadyToexport = (List <InventoryItem>)TempData["ReadyToExportSelection"]; string[] columns = { "ItemName", "Brand", "CustomID", "QuantityLeft", "Price", "Type", "GeneralDescription", "SoldtoDate" }; byte[] filecontent = ExcelExportHelper.ExportExcel(ReadyToexport, "Inventory", false, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "Inventory_Report_" + DateTime.Now.DayOfYear + "_" + DateTime.Now.Year + ".xlsx")); }
public FileContentResult ExportToExcel() { List <Ent_Bataclub> listbataclub = (List <Ent_Bataclub>)Session[_session_listbataclub_private]; //List<Technology> technologies = StaticData.Technologies; string[] columns = { "cod_tienda", "des_tienda", "semana", "fecha", "dni", "bolfac", "pares", "soles", "estado", "fecha_ing", "promocion" }; byte[] filecontent = ExcelExportHelper.ExportExcel(listbataclub, "BATACLUB", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "bataclub.xlsx")); }
public FileContentResult ExportToExcel() { List <Reporte_Resultado> listValeCompra = (List <Reporte_Resultado>)Session[_session_listValeCompraDetalle_private]; //List<Technology> technologies = StaticData.Technologies; string[] columns = { "Institucion", "Codigo", "Numero", "soles", "Estado", "Codigo_tda", "Desc_tda", "Documento", "Fecha_doc", "DNI", "Cliente" }; byte[] filecontent = ExcelExportHelper.ExportExcel(listValeCompra, "Vales de Compra", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "ValeCompra.xlsx")); }
public FileContentResult ExportToExcel_Prom() { List <Ent_Promotion_Orce> listpromorce = (List <Ent_Promotion_Orce>)Session[_session_lis_promo_orce_private]; //List<Technology> technologies = StaticData.Technologies; string[] columns = { "CAMPAIGN_ID", "PROMOTION_ID", "PROMOTION_NAME", "TIPO_PROMOCION", "FEC_INICIO", "FEC_FIN", "HORA_INICIO", "HORA_FIN", "FEC_CREACION", "USUARIO_CREACION", "ESTADO", "ULTIMA_EXPORTACION", "UBIC_INCLUIDAS", "UBIC_EXCLUIDAS", "SEGMENTO_OBJETIVO", "PROMO_ACTIVADO", "EXPORTS", "ID_OFERTA", "CODIGO_OFERTA", "CODIGO_CUPON", "CANT_CUPON_GEN", "NAME_OFERTA", "NOMBRE_PDV", "TIPO_OFERTA", "CALIF_INCL", "CALIF_EXCL", "AWARD_INCL", "AWARD_EXCL", "TIPO_PROMO_PREVISTA", "SUBTOTAL_MIN", "SUBTOTAL_MAX", "IMPORTE_MAX_PREMIO", "DEAL_ACTIVADO", "ESTILO_UMBRAL", "TIPO_UMBRAL", "UMBRAL", "TIPO_DESCUENTO", "VALOR_DESCUENTO", "CANTIDAD_MAXIMA", "LIMITE_OFERTA", "DESCUENTO_PRORRATEADO" }; byte[] filecontent = ExcelExportHelper.ExportExcel(listpromorce, "Promocion Orce", true, columns); return(File(filecontent, ExcelExportHelper.ExcelContentType, "PromOrce.xlsx")); }
public FileContentResult ListaClienteExcel() { List <Ent_Cliente_Lista> lista = (List <Ent_Cliente_Lista>)Session[_session_listCliente_private]; string[] columns = { "dni", "nombres", "correo", "telefono", "direccion", "bas_fecha_cre", "bas_fec_actv" }; byte[] filecontent = ExcelExportHelper.ExportExcel(lista, "LISTA DE CLIENTES - CATALOGO - BATA", false, columns); string nom_excel = "Lista de Clientes"; return(File(filecontent, ExcelExportHelper.ExcelContentType, nom_excel + ".xlsx")); }
public FileContentResult ListaPedSepExcel() { List <Ent_Pedido_Separado> lista = (List <Ent_Pedido_Separado>)Session[_session_listPedidoSeparado_private]; string[] columns = { "asesor", "lider", "promotor", "pedido", "tcantidad", "subtotal", "fecha_ing", "fecha_cad", "fecha_cad", "dias_pedido", "celular", "telefono", "ubicacion" }; byte[] filecontent = ExcelExportHelper.ExportExcel(lista, "LISTA DE PEDIDOS SEPARADO - CATALOGO - BATA", false, columns); string nom_excel = "Lista de Clientes"; return(File(filecontent, ExcelExportHelper.ExcelContentType, nom_excel + ".xlsx")); }