Hi, can you test this example and let me know if you have any issues with it?
you can also provide some examples of your code if it's very different than this one.
library(shiny)
library(readxl)
ui <- fluidPage(
fileInput("file1","Select the file"),
tableOutput("mytable")
)
server <- function(input, output, session) {
observeEvent(input$file1,{
print(input$file1$datapath)
mydf <- read_excel(input$file1$datapath, 1)
if(ncol(mydf) != 10){
showNotification("please select a file with 10 columns", type="warning")
} else{
output$mytable = renderTable({ mydf })
}
})
}
shinyApp(ui, server)