require(xlsx)
read.xlsx("myfile.xlsx", sheetName = "Sheet1")
read.xlsx2("myfile.xlsx", sheetName = "Sheet1")
library("xlsx")
write.xlsx(x, file, sheetName = "Sheet1",
col.names = TRUE, row.names = TRUE, append = FALSE)
# Loading
library("readxl")
# xls files
my_data <- read_excel("my_file.xls")
# xlsx files
my_data <- read_excel("my_file.xlsx")
require(gdata)
df = read.xls ("myfile.xlsx"), sheet = 1, header = TRUE)
my_data <- read.table(file = "clipboard",
sep = " ", header=TRUE)
require(RODBC)
conn = odbcConnectExcel("myfile.xlsx") # open a connection to the Excel file
sqlTables(conn)$TABLE_NAME # show all sheets
df = sqlFetch(conn, "Sheet1") # read a sheet
df = sqlQuery(conn, "select * from [Sheet1 $]") # read a sheet (alternative SQL sintax)
close(conn) # close the connection to the file