I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message " In system(cmd) : perl not found" What is the "easiest" way to write an R dataframe to Excel? (I am familiar with WriteXLS, but I do not have PERL installed, and if not needed, do not wish to install it.) I am also familiar with write.table, but if possible, wish to create an excel file form within R. I'm unsure if this is possible, or perhaps i should just go ahead and install PERL...? [[alternative HTML version deleted]]
On Mon, Aug 23, 2010 at 10:50 PM, Eva Nordstrom <eva.nordstrom at yahoo.com> wrote:> I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl not found" > > What is the "easiest" way to write an R dataframe to Excel?? (I am familiar with > WriteXLS, but I do not have PERL installed, and if not needed, do not wish to > install it.) >For easy ways, check RExcel and, perhaps, exporting a df to CSV via Rcmdr menus (Data > Active data set > Export). Liviu> I am also familiar with write.table, but if possible, wish to create an excel > file form within R. > > I'm unsure if this is possible, or perhaps i should just go ahead and install > PERL...? > > > > ? ? ? ?[[alternative HTML version deleted]] > > > ______________________________________________ > 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. > >-- Do you know how to read? http://www.alienetworks.com/srtest.cfm http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader Do you know how to write? http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote:> I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl not found" > > What is the "easiest" way to write an R dataframe to Excel? (I am familiar with > WriteXLS, but I do not have PERL installed, and if not needed, do not wish to > install it.) > > I am also familiar with write.table, but if possible, wish to create an excel > file form within R. > > I'm unsure if this is possible, or perhaps i should just go ahead and install > PERL...?There is a page in the R Wiki that provides an overview of your options: http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows If you just need to do this once or just with a single data frame and writing the data frame to a CSV file and then opening the CSV file in Excel is satisfactory from a process/time standpoint, then using ?write.table might be the best approach. On the other hand, if you are writing a number of data frames to a single Excel file and perhaps need to do this with some frequency, you will want to consider one of the other, more automated, approaches where you can create an Excel file directly from within R. If you wish to use WriteXLS, there is an INSTALL file that you can review online (also in the package installation folder): http://cran.r-project.org/web/packages/WriteXLS/INSTALL The easiest way to install Perl on Windows, that also has the Perl modules required for WriteXLS, is to use the ActiveState Perl distribution, available from: http://www.activestate.com/activeperl/ If you have problems or other questions with respect to WriteXLS, let me know. HTH, Marc Schwartz
On Aug 23, 2010, at 4:52 PM, Marc Schwartz wrote:> On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: > >> I am using R 2.11.1 in a Microsoft Windows 7 environment. >> >> I tried using WriteXLS, but get the message " In system(cmd) : perl >> not found" >> > Snipped muc useful information> If you have problems or other questions with respect to WriteXLS, > let me know.Thanks for creating WriteXLS, Marc. Others should know that WriteXLS has the great advantage over *.csv writing, in that it lets you make multi-sheet XLS files. Need a vector of 16 dataframes written to 16 worksheets in one workbook ... no problem, ... worked the first time (at least it did so once I realized I needed to follow the directions in the help page exactly as they were written :-). David Winsemius, MD West Hartford, CT
On Aug 23, 2010, at 4:22 PM, David Winsemius wrote:> > On Aug 23, 2010, at 4:52 PM, Marc Schwartz wrote: > >> On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: >> >>> I am using R 2.11.1 in a Microsoft Windows 7 environment. >>> >>> I tried using WriteXLS, but get the message " In system(cmd) : perl not found" >>> >> Snipped muc useful information > >> If you have problems or other questions with respect to WriteXLS, let me know. > > Thanks for creating WriteXLS, Marc. Others should know that WriteXLS has the great advantage over *.csv writing, in that it lets you make multi-sheet XLS files. Need a vector of 16 dataframes written to 16 worksheets in one workbook ... no problem, ... worked the first time (at least it did so once I realized I needed to follow the directions in the help page exactly as they were written :-).Thanks for your kind words David. Much appreciated. If you have suggestions on improving the INSTALL file or help page content, let me know. :-) Regards, Marc
In addition to the Wiki already mentioned, the following may be useful: http://learnr.wordpress.com/2009/10/06/export-data-frames-to-multi-worksheet-excel-file/ Eva Nordstrom wrote:> I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl not found" > > What is the "easiest" way to write an R dataframe to Excel? (I am familiar with > WriteXLS, but I do not have PERL installed, and if not needed, do not wish to > install it.) > > I am also familiar with write.table, but if possible, wish to create an excel > file form within R. > > I'm unsure if this is possible, or perhaps i should just go ahead and install > PERL...? > > > > [[alternative HTML version deleted]] > > > > ------------------------------------------------------------------------ > > ______________________________________________ > 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.
Search for an older message with the subject line [R] export tables to excel files on multiple sheets with titles for each table On 8/23/2010 11:41 PM, Erik Iverson wrote:> In addition to the Wiki already mentioned, the following may be > useful: > > http://learnr.wordpress.com/2009/10/06/export-data-frames-to-multi-worksheet-excel-file/ > > > Eva Nordstrom wrote:
Hi r-help-bounces at r-project.org napsal dne 23.08.2010 21:50:01:> I am using R 2.11.1 in a Microsoft Windows 7 environment. > > I tried using WriteXLS, but get the message " In system(cmd) : perl notfound"> > What is the "easiest" way to write an R dataframe to Excel? (I amfamiliar with> WriteXLS, but I do not have PERL installed, and if not needed, do notwish to> install it.) > > I am also familiar with write.table, but if possible, wish to create anexcel> file form within R.How big is your table If it fit to clipboard you can write.table(some.data.frame, "clipboard", sep="\t", row.names=FALSE) and press CTRL-C in Excel If not you can write.table(some.data.frame, "mytable.xls", sep="\t", row.names=FALSE) and the table is readable by Excel Regards Petr> > I'm unsure if this is possible, or perhaps i should just go ahead andinstall> PERL...? > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.