The enigmatically anonymous author of the always-excellent blog[1] Learning R has tackled the problem of exporting data from R to Excel. R has some pretty straightforward solutions for exporting a single data frame to a single worksheet in Excel, but what if you need to create a tabbed workbook with one tab (worksheet) per data frame? Learning R explores a number of solutions, including CRAN packages dataframes2xls, WriteXLS, RODBC and RBDCOMClient, and the commercial R package xlsReadWrite Pro. Each has their prerequisites and associated strength and weaknesses, but Learning R concludes:
The Windows-only solutions were (expectedly) the most flexible with RDCOMClient-approach providing the greatest control over output. However, if formatting was not that important the simplest way to export data to multiple Excel worksheets would be via RODBC (if on Windows machine).
Check the link below for the details of each method.
Learning R: Export Data Frames To Multi-worksheet Excel File
[1] Today's mood: vowelly.


Comments