Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

read xlsx in r

 
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
Source by www.milanor.net #
 
PREVIOUS NEXT
Tagged: #read #xlsx
ADD COMMENT
Topic
Name
7+3 =