How To Read Xlsx File In R
Now we can load this xls file to r as follows.
How to read xlsx file in r. 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. 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. Iris xls read xls excel file sheetindex 1 data xls xlsx read xlsx c. You should see some information echoed to the screen as shown in the below code snippet. To read excel xls and xlsx files in r we will use the package readxl.
Install readxl package by running the command install packages readxl. The readxl package comes with the function read excel to read xls and xlsx files.