Reputation: 47
I am taking the R programming class from Cousera, and while I was practising how to read in xlsx files using read.xlsx, I encountered the following error message:
dat<- read.xlsx(file="./data/nga.xlsx", sheetIndex=1)
Error in
.jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,
: java.util.zip.ZipException: oversubscribed literal/length tree
R version 3.2.1, R studio version 3.2.1, platform windows7 64bit. Can anyone give a hint what this message means and how to work around it?
Thanks, Gezimao
Upvotes: 3
Views: 3088
Reputation: 1173
Download and install this java:http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
then run your code and it should work. If it does check best answer :)
Upvotes: 0
Reputation: 11
I had the same problem. The .xlsx file may be 'read only'. Try 'Save As' to a new file from Excel and try read.xlsx again.
Upvotes: 0
Reputation: 165
The file you have downloaded was corrupted, so download again that file using the parameter 'mode="wb"'.
Upvotes: 2
Reputation: 3492
try this package https://github.com/hadley/readxl
read_excel("my-new-spreadsheet.xlsx")
Upvotes: 1