[R] Reading a data frame from R to excel

Felipe Carrillo mazatlanmexico at yahoo.com
Tue Sep 15 16:54:59 CEST 2009


I use sep="\t" for Excel files and sep="," for csv files.
# Save to Excel
write.table(objectname, file = "C:/Documents andSettings/Desktop/myfile.xls",sep="\t")


Felipe D. Carrillo  
Supervisory Fishery Biologist  
Department of the Interior  
US Fish & Wildlife Service  
California, USA


--- On Tue, 9/15/09, jim holtman <jholtman at gmail.com> wrote:

> From: jim holtman <jholtman at gmail.com>
> Subject: Re: [R] Reading a data frame from R to excel
> To: "filip rendel" <filip61 at hotmail.com>
> Cc: r-help at r-project.org
> Date: Tuesday, September 15, 2009, 3:32 AM
> '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?
> 
> ______________________________________________
> 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