I did look at the question posted here but I am having separate issues with the fact that I am also trying to unzip the file and after I have downloaded the file from the internet (and saved it locally) R cannot locate my document through the pathway I have provided.
url <- "https://www.eia.gov/electricity/data/eia923/xls/f923_2016.zip"
download.file(url, destfile= "C:\\Users\\reifers\\Google Drive\\CEO Data\\R\\Electricity\\genPortfolioCO\\EIA.GenData.zip")
install.packages("XLConnect")
library(XLConnect)
genData <- readWorksheetFromFile(unzip("C:/Users/reifers/Google Drive/CEO Data/R/Electricity/genPortfolioCO/EIA.GenData", "EIA923_Schedules_2_3_4_5_M_2016.xlsx")
sheet = 1, startRow = 6, header = TRUE)
This is the error that I currently get
Error: NoSuchMethodException (Java): No constructor matching the given parameters
In addition: Warning message:
In unzip("C:\\Users\\reifers\\Google Drive\\CEO Data\\R\\Electricity\\genPortfolioCO\\EIA.GenData", :
error 1 in extracting from zip file