Browse Source

Añadido botón de descarga.

main
marcelcosta 1 week ago
parent
commit
8aa83870a0
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      Nitrogen-CIT/app.R

+ 12
- 1
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({

Loading…
Cancel
Save