I created a reproducible example of your code. Please for further questions, try to do it yourself. This makes it a lot easier to find and solve the problem.
library(shiny)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
fileInput("prob1", label = "Excel File", multiple = F)
),
mainPanel(
tableOutput("one")
)
)
)
# Server logic
server <- function(input, output) {
output$one <- renderTable({
req(input$prob1)
Loadprob <- input$prob1
prob <- read.csv(Loadprob$datapath, header = T, sep = ";")
## prob <- read.xls(Loadprob$datapath)
validate(need(ncol(prob)==13, "Error"))
prob
})
}
shinyApp(ui, server)
I used read.csv instead of read.xls, as i could not install the xlsx-package, but that shouldnt be the issue.
You also have to include a req() at the beginning of the renderTable function, as it should only be executed, when a file is uploaded.
At the end, you have to tell which variable should be plotted as a table, which in this case is "prob".