IN R I can not open xlsx

0

I'm trying to open an xlsx with R and I do not get it.

I have done the following:

install.packages("XLConnect")
library (XLConnect)
wb <- loadWorkbook ("mi_fichero.xlsx", create= TRUE)
    
asked by aprendiendoR 14.03.2017 в 11:37
source

2 answers

1

This works well for me:

install.packages("xlsx")
library(xlsx)

x <- read.xlsx("rutadondetengastufichero.xlsx",sheetIndex=1,header=T)

Path where you have the file must be expressed or with \ or with / the sheetIndex refers to the excel sheet that you want to import and the header to if it has a header for the name of the columns.

I hope I helped you.

    
answered by 31.03.2017 в 20:36
-3
  

install.packages ("readxl")   Installing package into 'C: / Users / luis flores / Documents / R / win-library / 3.5'   (as 'lib' is unspecified)   Warning: package 'readxl' is in use and will not be installed   install.packages ("xlsx")   Installing package into 'C: / Users / luis flores / Documents / R / win-library / 3.5'   (as 'lib' is unspecified)   Testing the URL ' link '   Content type 'application / zip' length 458723 bytes (447 KB)   downloaded 447 KB

package 'xlsx' successfully unpacked and MD5 sums checked

The downloaded binary packages are in         C: \ Users \ luis flowers \ AppData \ Local \ Temp \ RtmpWCukSs \ downloaded_packages

  

library ("xlsx")   Error: package or namespace load failed for 'xlsx':    .onLoad failed in loadNamespace () for 'rJava', details:     call: fun (libname, pkgname)     error: JAVA_HOME can not be determined from the Registry

    
answered by 19.10.2018 в 07:03