[R] Multiple CSV files in different sheets of an Excel file

Frans Marcelissen fransiepansiekevertje at gmail.com
Wed Jan 13 15:44:58 CET 2016


Hi Mohse,
You can do that with the append parameter of the write.xlsx routine in the
xlsx package:

xlsx::write.xlsx(file1,file='XXXXX.xlsx',sheetName = '1')
xlsx::write.xlsx(file2,file='XXXXX.xlsx',sheetName = '2',append = T)

Success!
Frans

2016-01-13 15:18 GMT+01:00 Mohsen Jafarikia <jafarikia at gmail.com>:

> I have multiple CSV files that I would like to have them in a single Excel
> file. For example, I have file1.csv and file2.csv and I want to have
> file.xls where file1.csv and file2.csv each have been copied to a single
> sheet of the file.xls file.
>
> Thanks,
> Mohsen
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list