Gdata package perl issue

后端 未结 10 2347
无人及你
无人及你 2021-02-07 05:03

I am attempting to follow this easy 2-minute video tutorial on importing an Excel spreadsheet into R as a data frame: http://www.screenr.com/QiN8

I followed each step, i

相关标签:
10条回答
  • 2021-02-07 05:40

    In my case, I got the similar message:

    Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method,  : 
      Intermediate file 'C:\Users\ffffdd\AppData\Local\Temp\Rtmp6DG4Cr\file1ce018647411.csv' missing!
    In addition: Warning message:
    running command '"C:\Perl64\bin\PERL52~1.EXE" "C:/Users/ffffdd/Documents/R/win-library/3.4/gdata/perl/xls2csv.pl"  "D:/ffffdd/mlj/Results/xxxx.xlsx" "C:\Users\ffffdd\AppData\Local\Temp\Rtmp6DG4Cr\file1ce018647411.csv" "1"' had status 13 
    Error in file.exists(tfn) : invalid 'file' argument
    

    I figured out the solution by closing the Excel table, which cannot be opened by both Excel and R at the same time.

    0 讨论(0)
  • 2021-02-07 05:44

    You can try this sytax:

    T<-read.xls("Template.xlsx", perl = "C:\\Perl\\bin\\perl.exe")
    

    I found this solution here

    http://cran.r-project.org/web/packages/gdata/INSTALL

    0 讨论(0)
  • 2021-02-07 05:45

    I ran into this issue myself and finally found the culprit. In my initial code i was working with an excel file with 4 sheets, and was operating on the 4th sheet- read.xls(con, perl=prl, sheet=4). My new xlxs file had one sheet, causing the error.

    0 讨论(0)
  • 2021-02-07 05:47

    Make sure your path variable is NOT named "perl". I renamed it to prl and success!

    This did NOT work:

    perl <- "C:/Strawberry/perl/bin/perl.exe"
    excel_gdata <- read.xls(url_xls, perl)
    
    Error in findPerl(verbose = verbose) : 
      perl executable not found. Use perl= argument to specify the correct path.
    Error in file.exists(tfn) : invalid 'file' argument
    

    This works!

    prl <- "C:/Strawberry/perl/bin/perl.exe"
    excel_gdata <- read.xls(url_xls, prl)
    
    0 讨论(0)
提交回复
热议问题