I have a excel file like this:
I try to read it in read.xlsx
or read_excel
by skipping the second row:
library(xlsx)
df <- read.xlsx('./data.xls', 'Sheet1')
library(readxl)
df <- read_excel("./data.xls", sheet = 'Sheet0', skip = 2, col_names = TRUE)
The first one (read.xlsx
), I didn't find parameters for skip
rows, the second one give a df
without headers.
Where did I do wrong in the code above and how to read it correctly? Thanks.