How to read Excel files into R with package ‘XLConnect’

How to read data from Excel into R:

  1. Make sure ‘Java Development Kit’ is installed on the computer
  2. To add Java support to R run this command as root:
    R CMD javareconf
  3. Install and load the package in R
  4. Read Excel file
    fxls=readWorksheetFromFile('file.xls', sheet=1)


Error message:
“OldExcelFormatException (Java): The supplied spreadsheet seems to be Excel 5.0/7.0 (BIFF5) format. POI only supports BIFF8 format (from Excel versions 97/2000/XP/2003)”

!!  Only supports format from Excel versions 97/2000/XP/2003 !!
See gdata for newer Excel files!


Leave a Comment