0
votes

I have a Shiny Application in which the user browse for a file. Once the file is selected, I want it to be read into a table. The file is xlsx format, and it has two sheets, so I am using the function readWorksheetFromFile(file path, sheet = 1) to read in this table. In Shiny when you input a file, the line of code:

input$file$datapath gives you the path of a temporary location for that file. For some reason, this path is not valid in the readWorksheetFromFile function. Is there a way to get the exact file path of a file the user selects in R?

1

1 Answers

0
votes

The input$file$datapath provide a path to the temporary filename without the .xlsx extension. I think that could be the reason. You can rename it and try again.