Read only certain columns from xls

前端 未结 3 1638
北海茫月
北海茫月 2021-01-06 10:59

I have an excel spreadsheet with several sheets. The format is as below:

Date        A       B       C       D       E       F                       Referenc         


        
3条回答
  •  情歌与酒
    2021-01-06 12:03

    With the readxl package using read_xlsx you can specify the range. Use read_xls or read_excel depending on file type.

    library(readxl)
    df <- read_xlsx(path = "filename.xlsx", sheet = "sheetname", range = cell_cols("A:G"))
    

提交回复
热议问题