I am using R with readxl
package. I try to import an Excel file with the following command:
library(readxl) city_codes <- read_excel("./data/file.xlsx", sheet = "city_codes")
It says it is a zip file and cannot be opened:
Error in sheets_fun(path) : Evaluation error: zip file './data/file.xlsx' cannot be opened.
Any ideas?
Xlsx files are just ZIP files, so you can simply unzip them right away using your favourite ZIP tool. Open your zip file tool, like for example, Winrar, find your excel file there, right-click on it, then you can simply "extract to a specified folder" and then your xml files will be saved there.
I had this error, but for me, it was just that I had the sheet open in Excel while trying to read it into R. I guess the package wrongly perceives it as a zip file when it's trying to read it while Excel has partial ownership of it (and this blocks the read).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With