From 8aa83870a091e8a81dab03d84d37978c816e2f79 Mon Sep 17 00:00:00 2001 From: marcelcosta Date: Thu, 23 Oct 2025 12:05:22 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20bot=C3=B3n=20de=20descarga.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Nitrogen-CIT/app.R | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Nitrogen-CIT/app.R b/Nitrogen-CIT/app.R index bb60f53..23fef3e 100644 --- a/Nitrogen-CIT/app.R +++ b/Nitrogen-CIT/app.R @@ -8,7 +8,8 @@ ui <- fluidPage( navbarPage("Nitrogen CIT", tabPanel("Listado", sidebarPanel( - fileInput(inputId = "file", label = "Fichero", multiple = F) + fileInput(inputId = "file", label = "Fichero", multiple = F), + downloadButton("downloadData", "Descargar Excel") ), mainPanel( @@ -99,6 +100,16 @@ server <- function(input, output) { datatable(dades$taula, filter = "top", rownames = F, escape = F, extensions='Buttons',options = list(autoWidth=TRUE, dom = 'Bfrtip',buttons=I('colvis'), lengthMenu=c(10,20,50), pageLength=30)) }) + output$downloadData <- downloadHandler( + + filename = function() { + paste("Nitrogen", ".xlsx", sep="") + }, + content = function(file){ + write.xlsx(dades$taula, file) + } + ) + ## Caja ---- output$caja_out<-renderUI({