I’m encountering issues when attempting to upload a CSV file into my Shiny app.
After saving my Excel data as a CSV file and uploading it to the Shiny app. I tried checking what was happening on https://shiny.posit.co/r/gallery/widgets/file-upload/ and I saw that with the ‘header’ option enabled, Shiny throws an error stating “more columns than column names.”
Additionally, my Excel file contains two columns named ‘Temperature’ and ‘A1.’ However, when uploading the CSV file to Shiny, these column names are being interpreted as data points within the columns rather than as actual column headers. See
picture
Furthermore, my data contains comma’s (,) as decimal separators, which might be contributing to the parsing issues. I attempted to replace all comma’s in the Excel file with periods (.) before exporting it to CSV, but this did not seem to resolve the problem.
I save my data by exporting my Excel file as a CSV UTF-8 format and then directly upload it into the app.
The Shiny app I use is: https://pavloh.shinyapps.io/hrmR/ From Pavlo Hrab (http://doi.org/10.5281/zenodo.4491296)
Example data
df1 <- data.frame(Temperature = c(71.85, 71.79, 71.82, 71.79, 71.82, 71.79, 71.79, 71.82, 71.82), y = c(5.62, 5.68, 5.58, 5.57, 5.55, 5.55, 5.54, 5.51,5.52))
This is written in R and decimals are written as periods. My actual data is exported from an xlsx file to csv where decimals are written as decimals
Can someone please advise on how I can adjust my Excel file or export settings to ensure that the CSV file is readable by the Shiny app?
I tried uploading my data in the app expecting it to show my the melting curve analysis based of my data input. But I keep receiving errors.
Z de Koster is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.