I can use gdata to successfully read in the example Excel file, but not any other excel files. Why might this be the case? It seems that the problem has something to do with opening the database but no indication as to what the problem is. So i'm at a loss of how to fix it.
> library(gdata) gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED. gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED. <snip> > test <- read.xls("C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx", verbose=T) Using perl at C:\Perl64\bin\perl.exe Using perl at C:\Perl64\bin\perl.exe Converting xls file C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx to csv file C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv ... Executing ' "C:\Perl64\bin\perl.exe" "C:/Dropbox/R/library/gdata/perl/ xls2csv.pl" "C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx" "C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv" "1" '... Loading 'C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx'... Done. Orignal Filename: C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx Number of Sheets: 4 Writing sheet number 1 ('Sheet First') to file 'C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv' Minrow=0 Maxrow=7 Mincol=0 Maxcol=2 0 Done. Reading csv file C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv ... Done. This tells me that perl can be found, used, and my local temp directory can be written/read to just fine. Now to try to read one of my own files. > test <- read.xls("C:/Dropbox/Animals/LARPBO/Database.xlsx", verbose=T) Using perl at C:\Perl64\bin\perl.exe Using perl at C:\Perl64\bin\perl.exe Converting xls file C:/Dropbox/Animals/LARPBO/Database.xlsx to csv file C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv ... Executing ' "C:\Perl64\bin\perl.exe" "C:/Dropbox/R/library/gdata/perl/ xls2csv.pl" "C:/Dropbox/Animals/LARPBO/Database.xlsx" "C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv" "1" '... Unable to open file 'C:/Dropbox/Animals/LARPBO/Database.xlsx'. 2 Done. Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, : Intermediate file 'C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv' missing! In addition: Warning message: running command '"C:\Perl64\bin\perl.exe" "C:/Dropbox/R/library/gdata/perl/ xls2csv.pl" "C:/Dropbox/Animals/LARPBO/Database.xlsx" "C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv" "1"' had status 2 Error in file.exists(tfn) : invalid 'file' argument So it appears that it's a problem with the original Excel file. But there's nothing that tells me what the problem actually is. Thanks -Robin Jeffries [[alternative HTML version deleted]]
______________________________________________ R-help@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.