From pauljohn32 at gmail.com  Tue Sep 19 19:04:38 2017
From: pauljohn32 at gmail.com (Paul Johnson)
Date: Tue, 19 Sep 2017 12:04:38 -0500
Subject: [Rd] what do you think about write.table(... qmethod = "excel")?
Message-ID: <CAErODj-3gXgtoDZf8LMiw=1eQZOfUeTy=-vqr1pgstW-JdBFUw@mail.gmail.com>

Last week one of our clients reported trouble with a csv file I
generated with write.table.  He said that columns with quotes for
character variables were rejected by their data importer, which was
revised to match the way Microsoft Excel uses quotation marks in
character variables.  I explained to them that quoted character
variables are virtuous and wise, of course, but they say Microsoft
Excel CSV export no longer quotes characters unless they include
commas in the values.

They showed me a CSV file from Excel that looked like this

x1,x2,x3,x4 5 6
fred,barney,betty,x
bambam,"fred,wilma",pebbles,y

Note how the quotes only happen on row 2 column 2. I was surprised it
did that, but now I have some pressure to write a csv maker that has
that structure.  Its weird, even when there are spaces in values there
are no quotation marks.

Has anybody done this and verified that it matches CSV from MS Excel?
If I succeed will you consider a patch?

pj
-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.



[Rd] what do you think about write.table(... qmethod = "excel")?
Paul Johnson