How To Read Xlsx File In R

Iris xls read xls excel file sheetindex 1 data xls xlsx read xlsx c.
How to read xlsx file in r. The generic function of the package to read excel files into r is the read excel function which guesses the file type xls or xlsx depending on the file extension and the file itself. Now we can load this xls file to r as follows. Install readxl package by running the command install packages readxl. To read excel xls and xlsx files in r we will use the package readxl. The readxl package comes with the function read excel to read xls and xlsx files.
Library readxl my data read excel my file xls my data read excel my file xlsx the above r code assumes that the file my file xls and my file xlsx is in your current working directory. Iris xls read xls excel file sheetindex 1 exactly the same as in example 1 just with xls instead of xlsx.