0

im having some troubles in at work w/ an 32-bit windows 7 version, im on the task to create automatised xls document, for that i installed this 3 packages on R

  1. rJava
  2. xlsxjars
  3. xlsx

all seems to be fine but when i try to call the xlsx i get this

    > library(xlsx)
Loading required package: xlsx
Error: package or namespace load failed for ‘xlsx’:
 .onLoad failed in loadNamespace() for 'xlsx', details:
  call: .jinit()
  error: Cannot create Java virtual machine (-1)
> 

U.U im getting nuts in this hehehe any advices would be really nice! tank u for reading

mimus
  • 53
  • 5
  • 2
    The versions of R and Java must be compatible: if R is 32 bits so must be Java, and if not they must both be 64 bits. In Windows 7 R installs 32 and 64 bits, so maybe all you have to do is to run the right version. – Rui Barradas Mar 20 '19 at 19:16
  • 9
    Try the openxlsx package. It does not run on Java as far as I know: https://stackoverflow.com/questions/6099243/read-an-excel-file-directly-from-a-r-script/ – Mikko Mar 20 '19 at 19:22
  • 2
    Or `readxl`. Won't work for Excel output but does a good job reading in Excel files. – Gregor Thomas Mar 20 '19 at 19:32
  • im on 32 wind 7, anyway can i install an 64 bits java? actually i uninstalled both java and R and reinstall both, but is not working, i will try the openxlsx and told u, tank u for reading – mimus Mar 20 '19 at 20:23
  • Like @Gregor, I recommend {readxl} to read and {writexl} to write Excel files as they do not require Java. – Sébastien Rochette Mar 20 '19 at 21:37

0 Answers0