[R] read.xls can't read some .xls files

478 views
Skip to first unread message

shrey sinha

unread,
Mar 14, 2011, 8:07:42 AM3/14/11
to r-h...@r-project.org
Hi,

I am having problem with the read.xls function. I am trying to read a .xls
file but
it's giving me error.

> read.xls("XXX.xls")
Error parsing file 'XXX.xls'.
Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, :
Intermediate file '/tmp/Rtmp5QQjSI/file1665315c.csv' missing!
In addition: Warning message:
running command '"/usr/bin/perl"
"/home/t227/R/x86_64-pc-linux-gnu-library/2.12/gdata/perl/xls2csv.pl"
"XXX.xls" "/tmp/Rtmp5QQjSI/file1665315c.csv" "1"' had status 9
Error in file.exists(tfn) : invalid 'file' argument

And the file which I am trying to read opens perfectly in Open Office.

Any help will be appreciated.
--
Regards,
Shrey Sinha

[[alternative HTML version deleted]]

______________________________________________
R-h...@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.

Carl Witthoft

unread,
Mar 14, 2011, 7:27:36 PM3/14/11
to r-h...@r-project.org
First off, pardon the simple question, but is the XXX.xls file in your
current working directory? The error message might suggest that R (or
more precisely, the perl script) never saw the input file.

Have you been able to load any other Excel file into R?

My only other guess is that for some reason your /tmp directory has bad
permissions, so the /tmp/Rtmp.... directory couldn't be created.

Carl


//quote:
From: shrey sinha <shreysinha1_at_gmail.com>
Date: Mon, 14 Mar 2011 17:37:42 +0530


Hi,

I am having problem with the read.xls function. I am trying to read a
.xls file but
it's giving me error.

> read.xls("XXX.xls")

Error parsing file 'XXX.xls'.
Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, :
Intermediate file '/tmp/Rtmp5QQjSI/file1665315c.csv' missing! In
addition: Warning message:
running command '"/usr/bin/perl"
"/home/t227/R/x86_64-pc-linux-gnu-library/2.12/gdata/perl/xls2csv.pl"
"XXX.xls" "/tmp/Rtmp5QQjSI/file1665315c.csv" "1"' had status 9 Error in
file.exists(tfn) : invalid 'file' argument

And the file which I am trying to read opens perfectly in Open Office.

______________________________________________

Reply all
Reply to author
Forward
0 new messages