Re: [R] i want to export a data.frame to file.xls

From: Blay <>
Date: Mon, 19 May 2008 12:53:21 -0700 (PDT)

hanen wrote:
> in order to export a data.frame to sheet.xls i try:
> write(df,file="file_name.xls")
> but when i open it a message appears:
> "impossible to oppen this file. her format is unvalid"
> knowen that i work with excel_2007
> what is the solution ?
write.csv(df,"filename.csv") will save it in .csv format which is readable by excel. Can then be saved as .xls in excel OR
?write.xls (package: xlsReadWrite)

Blay S
Kumasi, Ghana.
View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 19 May 2008 - 20:08:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 19 May 2008 - 20:30:48 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive