Read only certain columns from xls

前端 未结 3 1646
北海茫月
北海茫月 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 11:39

    You can use library XLConnect to read .xls files. Function readWorksheet() lets you set columns and rows you need to import.

    library(XLConnect)
    wb<-loadWorkbook("wb.xls")
    data <- readWorksheet(wb, sheet = "Sheet1",startCol=1,endCol=7)
    

提交回复
热议问题