1library("readxl")
2# xls files
3my_data <- read_excel("my_file.xls")
4# xlsx files
5my_data <- read_excel("my_file.xlsx")
1
2require(RODBC)
3conn = odbcConnectExcel("myfile.xlsx") # open a connection to the Excel file
4sqlTables(conn)$TABLE_NAME # show all sheets
5df = sqlFetch(conn, "Sheet1") # read a sheet
6df = sqlQuery(conn, "select * from [Sheet1 $]") # read a sheet (alternative SQL sintax)
7close(conn) # close the connection to the file
8