Hello! I've generated multiple data frames that I wish to export to excel using the function write.table. When I do so all the data is merged into a single column in excel. I Would like the columns of my data frame in separate columns in excel as well but it doesn't work. I tried to download the package WriteXLS and installed Perl on my computer just like it was recommended. I also tried downloading dataframes2xls but none of them work. Is there an easier way of solving this? Would be very thankful for a reply! [[alternative HTML version deleted]]
'write.csv' works fine for me in exporting to Excel as a '.csv' file. Did you specify a separator (sep=',') in your 'write.table'? On Tue, Sep 15, 2009 at 5:58 AM, filip rendel <filip61 at hotmail.com> wrote:> > Hello! I've generated multiple data frames that I wish to export to excel using the function write.table. When I do so all the data is merged into a single column in excel. I Would like the columns of my data frame in separate columns in excel as well but it doesn't work. I tried to download the package WriteXLS and installed Perl on my computer just like it was recommended. I also tried downloading dataframes2xls but none of them work. Is there an easier way of solving this? > > Would be very thankful for a reply! > > ? ? ? ?[[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. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?
There is a package called 'xlsReadWrite', which has functions like read.xls & write.xls that might be helpful for you. You can also use write.table to produce .csv files, but you'll have to use it in the following manner: write.table(DataFrame, 'ExcelFile.csv', sep=",", col.names=T, row.names=F) Hope this helps. -Nandi On Sep 15, 4:58?am, filip rendel <fili... at hotmail.com> wrote:> Hello! I've generated multiple data frames that I wish to export to excel using the function write.table. When I do so all the data is merged into a single column in excel. I Would like the columns of my data frame in separate columns in excel as well but it doesn't work. I tried to download the package WriteXLS and installed Perl on my computer just like it was recommended. I also tried downloading dataframes2xls but none of them work. Is there an easier way of solving this? > > Would be very thankful for a reply! > > ? ? ? ? [[alternative HTML version deleted]] > > ______________________________________________ > R-h... at r-project.org mailing listhttps://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.
Hi Filip, Try also: write.table(object, "yourpath_with_xls_extension",sep="\t", quote = FALSE) HTH, Jorge On Tue, Sep 15, 2009 at 5:58 AM, filip rendel <> wrote:> > Hello! I've generated multiple data frames that I wish to export to excel > using the function write.table. When I do so all the data is merged into a > single column in excel. I Would like the columns of my data frame in > separate columns in excel as well but it doesn't work. I tried to download > the package WriteXLS and installed Perl on my computer just like it was > recommended. I also tried downloading dataframes2xls but none of them work. > Is there an easier way of solving this? > > Would be very thankful for a reply! > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]
On Sep 15, 2009, at 4:58 AM, filip rendel wrote:> > Hello! I've generated multiple data frames that I wish to export to > excel using the function write.table. When I do so all the data is > merged into a single column in excel. I Would like the columns of my > data frame in separate columns in excel as well but it doesn't work. > I tried to download the package WriteXLS and installed Perl on my > computer just like it was recommended. I also tried downloading > dataframes2xls but none of them work. Is there an easier way of > solving this? > > Would be very thankful for a reply!Filip, With respect to WriteXLS, it would be helpful to know what operating system you are on, what Perl distribution you installed, what code you used and what warning or error messages you observed, rather than simply stating that "none of them work". Without more details, it is impossible to assist you in getting the package, which does work on multiple platforms, to work for you. Regards, Marc Schwartz