Export data from Excel Sheet

Hi guys!

I'm trying to read a file from Excel and show it in Shiny App.

UI CODE

        fileInput(inputId = "Planilha",placeholder = "Selecione a planilha", buttonLabel = "Upar", label = "Ou selecione a planilha do Ys", multiple = FALSE, accept = ".xlsx")

  tableOutput("planilhaYs")

SERVER CODE

output$planilhaYs <- renderDataTable({ 
    input$Planilha
    
    df<-read_excel(input$Planilha$datapath, sheet = 1)
    return(df)  
    }
    )

Extension: .xlsx

But, no data appears.

Please have a look at 'create table output element' documentation.

renderTable should be used for tableOutput(outputId) instead of renderDataTable.

In your Server part, try replacing renderDataTable with renderTable (or on the other hand use dataTableOutput("planilhaYs") at UI)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.