excel - Gdata package perl issue -
i attempting follow easy 2-minute video tutorial on importing excel spreadsheet r data frame: http://www.screenr.com/qin8
i followed each step, including downloading , installing strawberry perl (32-bit) on win 7 pc, pointing r working directory, , entering following command in r:
spreadsheet <- read.xls("targetspreadsheet.xls")
i receive error:
error in findperl(verbose = verbose) : perl executable not found. use perl= argument specify correct path. error in file.exists(tfn) : invalid 'file' argument
update:
i reset machine , set path perl:
perl <- "c:/strawberry/perl/bin/perl.exe"
then entered command:
df <- read.xls("spreadsheet.xls", perl = perl)
the command line returned error:
error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, : intermediate file 'c:\users\aeid\appdata\local\temp\rtmpoxmywa\file18e45ed513c.csv' missing! in addition: warning message: running command '"c:\strawb~1\perl\bin\perl.exe" "c:/users/aeid/documents/r/win-library/2.15/gdata/perl/xls2csv.pl" "gft_show_wip_report(42).xls" "c:\users\aeid\appdata\local\temp\rtmpoxmywa\file18e45ed513c.csv" "1"' had status 2 error in file.exists(tfn) : invalid 'file' argument
what doing wrong?
thanks in advance help!
ame
after loading gdata package using library(gdata)
says:
gdata: read.xls() unable read excel xls , xlsx files gdata: unless 'perl=' argument used specify location of gdata: valid perl intrpreter.
so, need path valid perl interpreter. using windows, case here, need check properties locate required perl interpreter.
#set path perl interpreter perl <- "c:/strawberry/perl/bin/perl5.18.2.exe" try1file <- read.xls("my.one.filename.xls", perl = perl)
for multiple xls files:
> length(list.files()) [1] 65 try65files <- lapply(list.files(), ..., perl = perl)
if verbose = true
, @ end of each file read:
loading 'f65.xls'... done. orignal filename: f65.xls number of sheets: 1 writing sheet number 1 ('sheet1') file 'c:\users\frankl~1.joh\appdata\local\temp\rtmpeks3fi\file13dc750950e4.csv' minrow=0 maxrow=32 mincol=0 maxcol=16 (ignored 0 blank lines.) 0 done. reading csv file “c:\users\frankl~1.joh\appdata\local\temp\rtmpeks3fi\file13dc750950e4.csv” ... done.
Comments
Post a Comment