Skip to content
Prev 295125 / 398506 Next

write.xls

On 5/20/2012 5:37 PM, Gabor Grothendieck wrote:
<snip>
Thanks very much.  I got this to work.  However, I discovered three 
other problems with write.xls:


       (1) With "\n" in a character string in the data.frame, it fails 
to write a file, noting, "Infile name is not a valid csv file" without 
throwing an error.


       (2) With "," in a character string in the data.frame, it splits 
that element over multiple columns, thereby corrupting what is written.


       (3) It insists on quoting all all character strings.  I don't 
need or want those extraneous quotes, but I don't know how to get rid of 
them.


       I've modified the code to gsub('\n|,', ' ', strings);  this 
provides an acceptable fix to the first two problems.  I plan to ignore 
the third if I can't fix it.


       Thanks again,
       Spencer