Uploading and Downloading Files. NOTE: This article is only applicable if you are using the RStudio IDE within a web browser (as opposed to using RStudio as a standalone desktop application). To download the free Adobe PDF reader for Mac, head to Adobe’s official website and follow our instructions: Select the “PDF & E-signatures” option from the menu at the top of the website. A pop-up menu will appear.
MOOS Project Viewer is a Microsoft Project viewer that can open any MS Project file type (.mpp, .mpt, .mpx, .xml) for any Microsoft Project version (2000, 2003, 2007 and 2010). Available views: WBS, Gantt chart, task sheet, resource sheet, calendars. ...
- MOOS-3.1.5.dmg
- MS Project Viewer
- Shareware ($25.00)
- 9.38 Mb
- Mac OS X, Mac Other, Mac OS X 10.5, Mac OS X 10.4
Microsoft Query X for Mac 10.0 is a tool utilizing Open Database Connectivity (ODBC) for importing data from databases into MicrosoftExcel X. It is free. You can use Query X to create new queries or refresh existing queries that were created in. ...
- 233620-InstallMicrosoftQuery.sit.hqx.hqx
- 5am Code
- Freeware (Free)
- 2 Mb
- Any Platform
PageRank Viewer for Mac can display the Google pageranks of up to 20 websites a time.
- pr.dmg
- AceTools.net
- Freeware (Free)
- 8.87 Mb
- Mac OS X, Mac OS X 10.4, Mac OS X 10.5
MOOS Project Viewer is an easy-to-use Microsoft Project viewer that can help you open any Microsoft Project file type (.mpp, .mpt, .mpx, .xml) for any MS Project version. The application features WBS, Gantt chart, task sheet, resource sheet and. ...
- MOOS-2.7.dmg
- Stand By Soft Ltd
- Shareware ($25.00)
- 9.6 Mb
- Mac OS X
A Microsoft Project viewer that can open any MS Project file type (.mpp, .mpt, .mpx, .xml) for any Microsoft Project version (2000, 2003, 2007). Available views: WBS, Gantt chart, Tracking Gantt, Task Usage, Resource Sheet, Resource Usage.It is. ...
- MOOS-2.7.dmg
- Stand By Soft
- Freeware (Free)
- 10 Mb
- Mac OS X 10.4 or later
The ComponentOne ExcelViewer allows people who do not have MicrosoftExcel to view Excel workbook files. The ComponentOne Excel Viewer is a app that lets you view Microsoft Excel workbook files (xls, xlsx files).The ComponentOne Excel Viewer can open Microsoft Excel files but it will not display all features of Microsoft Excel.
- Excel Viewer for Windows 8
- GrapeCity, Inc.
- Freeware (Free)
- 2.2 Mb
- Windows 8
With ExcelViewer 2003, you can open, view, and print Excel workbooks, even if you dont have Excel installed. You can also copy data from ExcelViewer 2003 to another program. However, you cannot edit data, save a workbook, or create a new workbook.
- Microsoft Excel Viewer 2003
- Microsoft Corporation
- Freeware (Free)
- 9.93 Mb
- Windows 2003, XP, 2000
Super fast photo viewer software with wonderful experience, supports almost all photos formats and RAW files, batch process and effective touch up features for photo browsing. Different picture viewing modes to meet all your requirements.
- Photo_Viewer.dmg
- iFotosoft Ltd.
- Shareware ($9.99)
- 5.14 Mb
- Mac OS X
RationalPlan Project Viewer is a free project scheduling software viewer, the perfect solution for anyone (from project stakeholders to team workers) to view your projects in detail.
- RationalPlan-Viewer-4.16.7500.dmg
- Stand By Soft Ltd
- Freeware (Free)
- 96.22 Mb
- Mac OS X
Outlook MSG Viewer is a Mac-only program which allows you to view Microsoft Outlook .MSG files seamlessly inside your Mac mail client (Apple Mail, Entourage, etc.). This is especially handy if youve imported your Microsoft Outlook e-mails from a PC. ...
- OutlookMsgTrial1.1.dmg
- Element TwentySix
- Freeware (Free)
- 7.7 Mb
- Mac OS X 10.5 or later
This update addresses several buffer overrun vulnerabilities in Microsoft Word, Excel, PowerPoint, and Entourage for Office 2001. It also addresses an issue affecting the display of Japanese characters placed in the header or footer of an Excel. ...
- Office2001-906UpdateEN.bin
- 5am Code
- Freeware (Free)
- 18.8 Mb
- Mac OS 8.1 or later
A free standalone .rpt file viewer that allows you to open, view, and explore interactive reports straight from your desktop. Whether you work online or not, you can create customized views of the data without the need for a report designer or. ...
- Crystal Reports Viewer2008.zip
- SAP Business Objects
- Freeware (Free)
- 41.9 Mb
- Mac OS X 10.4 or later
Related:Microsoft Excel Viewer For Mac - Microsoft Excel Viewer On Htc - Microsoft Office Excel Viewer - Microsoft Aspx Viewer For Mac - Excel Viewer For Mac
How can I read an Excel file directly into R? Or should I first export the data to a text- or CSV file and import that file into R?
12 Answers
Yes. See the relevant page on the R wiki. Short answer: read.xls
from the gdata
package works most of the time (although you need to have Perl installed on your system -- usually already true on MacOS and Linux, but takes an extra step on Windows, i.e. see http://strawberryperl.com/). There are various caveats, and alternatives, listed on the R wiki page.
The only reason I see not to do this directly is that you may want to examine the spreadsheet to see if it has glitches (weird headers, multiple worksheets [you can only read one at a time, although you can obviously loop over them all], included plots, etc.). But for a well-formed, rectangular spreadsheet with plain numbers and character data (i.e., not comma-formatted numbers, dates, formulas with divide-by-zero errors, missing values, etc. etc. ..) I generally have no problem with this process.
David LeBauerLet me reiterate what @Chase recommended: Use XLConnect.
The reasons for using XLConnect are, in my opinion:
- Cross platform. XLConnect is written in Java and, thus, will run on Win, Linux, Mac with no change of your R code (except possibly path strings)
- Nothing else to load. Just install XLConnect and get on with life.
- You only mentioned reading Excel files, but XLConnect will also write Excel files, including changing cell formatting. And it will do this from Linux or Mac, not just Win.
XLConnect is somewhat new compared to other solutions so it is less frequently mentioned in blog posts and reference docs. For me it's been very useful.
JD LongJD LongAnd now there is readxl:
The readxl package makes it easy to get data out of Excel and into R. Compared to the existing packages (e.g. gdata, xlsx, xlsReadWrite etc) readxl has no external dependencies so it's easy to install and use on all operating systems. It is designed to work with tabular data stored in a single sheet.
readxl is built on top of the libxls C library, which abstracts away many of the complexities of the underlying binary format.
It supports both the legacy .xls format and .xlsx
readxl is available from CRAN, or you can install it from github with:
Usage
Note that while the description says 'no external dependencies', it does require the Rcpp
package, which in turn requires Rtools (for Windows) or Xcode (for OSX), which are dependencies external to R. Though many people have them installed for other reasons.
EDIT 2015-October: As others have commented here the openxlsx
and readxl
packages are by far faster than the xlsx
package and actually manage to open larger Excel files (>1500 rows & > 120 columns). @MichaelChirico demonstrates that readxl
is better when speed is preferred and openxlsx
replaces the functionality provided by the xlsx
package. If you are looking for a package to read, write, and modify Excel files in 2015, pick the openxlsx
instead of xlsx
.
Pre-2015: I have used xlsx
package. It changed my workflow with Excel and R. No more annoying pop-ups asking, if I am sure that I want to save my Excel sheet in .txt format. The package also writes Excel files.
However, I find read.xlsx
function slow, when opening large Excel files. read.xlsx2
function is considerably faster, but does not quess the vector class of data.frame columns. You have to use colClasses
command to specify desired column classes, if you use read.xlsx2
function. Here is a practical example:
read.xlsx('filename.xlsx', 1)
reads your file and makes the data.frame column classes nearly useful, but is very slow for large data sets. Works also for .xls
files.
read.xlsx2('filename.xlsx', 1)
is faster, but you will have to define column classes manually. A shortcut is to run the command twice (see the example below). character
specification converts your columns to factors. Use Date
and POSIXct
options for time.
Given the proliferation of different ways to read an Excel file in R
and the plethora of answers here, I thought I'd try to shed some light on which of the options mentioned here perform the best (in a few simple situations).
Rstudio Download Windows 10
I myself have been using xlsx
since I started using R
, for inertia if nothing else, and I recently noticed there doesn't seem to be any objective information about which package works better.
Any benchmarking exercise is fraught with difficulties as some packages are sure to handle certain situations better than others, and a waterfall of other caveats.
That said, I'm using a (reproducible) data set that I think is in a pretty common format (8 string fields, 3 numeric, 1 integer, 3 dates):
I then wrote this to csv and opened in LibreOffice and saved it as an .xlsx file, then benchmarked 4 of the packages mentioned in this thread: xlsx
, openxlsx
, readxl
, and gdata
, using the default options (I also tried a version of whether or not I specify column types, but this didn't change the rankings).
I'm excluding RODBC
because I'm on Linux; XLConnect
because it seems its primary purpose is not reading in single Excel sheets but importing entire Excel workbooks, so to put its horse in the race on only its reading capabilities seems unfair; and xlsReadWrite
because it is no longer compatible with my version of R
(seems to have been phased out).
I then ran benchmarks with NN=1000L
and NN=25000L
(resetting the seed before each declaration of the data.frame
above) to allow for differences with respect to Excel file size. gc
is primarily for xlsx
, which I've found at times can create memory clogs. Without further ado, here are the results I found:
1,000-Row Excel File
So readxl
is the winner, with openxlsx
competitive and gdata
a clear loser. Taking each measure relative to the column minimum:
We see my own favorite, xlsx
is 60% slower than readxl
.
25,000-Row Excel File
Due to the amount of time it takes, I only did 20 repetitions on the larger file, otherwise the commands were identical. Here's the raw data:
Here's the relative data:
So readxl
is the clear winner when it comes to speed. gdata
better have something else going for it, as it's painfully slow in reading Excel files, and this problem is only exacerbated for larger tables.
Two draws of openxlsx
are 1) its extensive other methods (readxl
is designed to do only one thing, which is probably part of why it's so fast), especially its write.xlsx
function, and 2) (more of a drawback for readxl
) the col_types
argument in readxl
only (as of this writing) accepts some nonstandard R
: 'text'
instead of 'character'
and 'date'
instead of 'Date'
.
Rstudio Download For Windows
I've had good luck with XLConnect
: http://cran.r-project.org/web/packages/XLConnect/index.html
Just gave the package openxlsx
a try today. It worked really well (and fast).
Another solution is the xlsReadWrite
package, which doesn't require additional installs but does require you download the additional shlib before you use it the first time by :
Forgetting this can cause utter frustration. Been there and all that...
On a sidenote : You might want to consider converting to a text-based format (eg csv) and read in from there. This for a number of reasons :
whatever your solution (RODBC, gdata, xlsReadWrite) some strange things can happen when your data gets converted. Especially dates can be rather cumbersome. The
HFWutils
package has some tools to deal with EXCEL dates (per @Ben Bolker's comment).if you have large sheets, reading in text files is faster than reading in from EXCEL.
for .xls and .xlsx files, different solutions might be necessary. EG the xlsReadWrite package currently does not support .xlsx AFAIK.
gdata
requires you to install additional perl libraries for .xlsx support.xlsx
package can handle extensions of the same name.
As noted above in many of the other answers, there are many good packages that connect to the XLS/X file and get the data in a reasonable way. However, you should be warned that under no circumstances should you use the clipboard (or a .csv) file to retrieve data from Excel. To see why, enter =1/3
into a cell in excel. Now, reduce the number of decimal points visible to you to two. Then copy and paste the data into R. Now save the CSV. You'll notice in both cases Excel has helpfully only kept the data that was visible to you through the interface and you've lost all of the precision in your actual source data.
Expanding on the answer provided by @Mikko you can use a neat trick to speed things up without having to 'know' your column classes ahead of time. Simply use read.xlsx
to grab a limited number of records to determine the classes and then followed it up with read.xlsx2
Example
JasonAizkalnsJasonAizkalnsAn Excel file can be read directly into R as follows:
Reading xls and xlxs files using readxl package
Ashok Kumar JayaramanRstudio Org
Ashok Kumar Jayaramanprotected by Brad Larson♦Jul 26 '16 at 17:53
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?