[R] xlsx problem

From: Martin Knapp <mkna005_at_aucklanduni.ac.nz>
Date: Tue, 29 Mar 2011 09:43:13 +1300


Dear list,
I'm running windows xp with R 2.12.0. I'm trying to load a excel spreadsheet into R using the xlsx package. I posted my code below with the error I get.

> res <- read.xlsx("Copy of test_excel_input_data.xlsx", 6)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :   java.lang.IllegalStateException: Cannot get a numeric value from a text cell

There are 6 sheets in that file. 5 of them are read into a dataframe without problem. For the 6th one(the one I actually need) I get this error message.
There is obviously something in the format of the sheet wrong. Has anyone an idea whats going wrong and what I have to change in the sheet?

Thanks in advance,

Christoph



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 28 Mar 2011 - 20:46:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Mar 2011 - 01:50:24 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive