I think remember this error from trying to write an Excel file that already 
existed. If this file already exists, try to delete it and see, if this solves 
the issue.

Besides that you're writing that you are "Using write.xlsx to extract data from 
an Excel file", write.xlsx() is to write an Excel file, not to read from it. 
Should be read.xlsx() then iirc.

 
 

Gesendet: Freitag, 15. März 2024 um 08:38 Uhr
Von: "Ivan Krylov via R-help" <r-help@r-project.org>
An: "Subia Thomas OI-US-LIV5" <thomas.su...@draexlmaier.com>
Cc: "r-help@r-project.org" <r-help@r-project.org>
Betreff: Re: [R] write.xlsx error message
В Thu, 14 Mar 2024 14:12:12 +0000
Subia Thomas OI-US-LIV5 <thomas.su...@draexlmaier.com> пишет:

> Using write.xlsx to extract data from an Excel file, I get this error
> message.
>
>
> Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod",
> cl, : java.lang.OutOfMemoryError: GC overhead limit exceeded

There seems to be a default limit of 512 megabytes for the Java heap
size:

library(rJava)
getOption('java.parameters')
# [1] "-Xmx512m"

Does if help if you set options(java.parameters = '-Xmx2048m') (or
as much as you feel comfortable with) before loading XLConnect?

--
Best regards,
Ivan

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html][http://www.R-project.org/posting-guide.html[http://www.R-project.org/posting-guide.html]]
and provide commented, minimal, self-contained, reproducible code.
 
 

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to