Hi,
I am trying to import data from a huge Excel file using the readxl package. I want to select only certain columns and cells of the Excel file using the following code:
library(readxl)
XYZ <- read_excel("XYZ.xlsx", sheet = "Quarterly Series", range = c("A372:A378", "BL372:BL378", "CF372:CF378", "DX372:DX378"), col_types = c("date", "numeric", "numeric", "numeric"), col_names = c("date", "Germany", "France", "Italy"))
Unfortunately I always get the error message "Error in as.cell_limits.character(range) : length(x) == 1L is not TRUE". What is the problem with my code or is there a better approach to select certain columns of an Excel file?
Thanks