[R] Error when writing to Excel files using the packages xlsx and xlsx2

Denis Kazakiewicz d.kazakiewicz at gmail.com
Wed Jul 13 11:56:50 CEST 2011

write.csv(mydata,  file="mydataExported.csv", na="")

On 13.07.2011 12:46, syrvn wrote:
> Dear group,
> I am working on a rather big project where the output data frames have
> dimensions of 3000 x 15 or greater. We are using xlsx and xlsx2 to write the
> data.frames to Excel sheets.
> Since recently we get the following error, when trying to write the data
> frames to the excel sheets:
> Error in ls(envir = envir, all.names = private) :
>    invalid 'envir' argument
> We figured out that the error occurs when the excel sheet is open while R
> tries to write to it.
> But now, closing all open excel sheets does not fix the error any longer. We
> also tried deleting the excel sheet in case it might be corrupt but we still
> get the same error.
> We have a very narrow timeframe so any help on how to fix that error is very
> much appreciated.
> Best regards,
> Flo
> --
> View this message in context: http://r.789695.n4.nabble.com/Error-when-writing-to-Excel-files-using-the-packages-xlsx-and-xlsx2-tp3664617p3664617.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at r-project.org mailing list
> 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.

More information about the R-help mailing list