[R-sig-teaching] Read *.xlsx data file into R

David Pell David.Pell at mrc-hnr.cam.ac.uk
Wed Sep 23 16:15:47 CEST 2015


Difficult to know what's going on without an error message or an example.

Are you specifying which sheet within the workbook you are using?

require(xlsx)
read.xlsx("myfile.xlsx", sheetName = "Sheet1") read.xlsx2("myfile.xlsx", sheetName = "Sheet1")

Alternatively you could save the xslx as a csv then use the read.table

df = read.table("myfile.csv", header = TRUE)

David

> On Sep 23, 2015, at 10:02 AM, Steven Stoline <sstoline at gmail.com> wrote:
>
> Dear All:
>
> I am having trouble reading an  *.xlsx data file into R.
>
> I tried to install the packages XLSX and readx1, but still did not work.
>
> Any helps will be appreciated.
>
> with many thanks
> sreve
>
> --
> Steven M. Stoline
> 1123 Forest Avenue
> Portland, ME 04112
> sstoline at gmail.com
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-teaching at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-teaching

_______________________________________________
R-sig-teaching at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
________________________________


This email may have a protective marking please see http://www.mrc.ac.uk/about/information-standards/document-marking-policy/ <http://www.mrc.ac.uk/about/information-standards/document-marking-policy/>

This email and any attachments are intended for the named addressee(s) only. If you are not the intended recipient, please notify MRC HNR immediately and do not disclose, distribute, or retain this email or any part of it. While MRC HNR has taken every reasonable precaution to minimise risk of this e-mail or any attachments containing viruses, the recipient should carry out its own virus checks before opening the attachments. MRC HNR does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. MRC HNR reserves the right to monitor all e-mail communications through their networks for the purposes of preventing and detecting crime.
---------------------------------------------------------------------------------------
 This email has been scanned for email related threats and delivered safely by Mimecast.
 For more information please visit http://www.mimecast.com
---------------------------------------------------------------------------------------

	[[alternative HTML version deleted]]



More information about the R-sig-teaching mailing list