

If you are of this opinion, you may want to file a request with the Feeds project.

One might argue that Drupal (or more specifically the Feeds module) should support Microsoft's CSV, and thus handle apostrophes gracefully when not wrapped in double quotes.

It all depends on the languages and language environments you're comfortable with, however. This allows time to replace the quotation marks prior to writing to file. The reason is that ConvertTo-CSV converts to CSV format, but does not export to a file.
EXCEL FOR MAC ESCAPE SINGLE QUOTES IN CSV INSTALL
If you have a lot of rows in your CSV with apostrophes or single quotes, then you've got a bit of pain.Īlternately, if you've got Python on your machine, or are willing to install it, this python script to add double-quotes to CSVs may work for you, and may be much easier than dealing with Excel macros. If you want to do this all in a single command, it is easier to switch to using the ConvertTo-CSV cmdlet instead of the Export-CSV cmdlet. Each field is comma separated and has quotation marks around the value in the field. csv files if the field contains a number. If you only have a few rows with apostrophes, then that may not be a big deal. Excel is stripping off quotation marks from. Or, since Drupal is telling you where the problem is, you can do it manually. Part of the problem here is that there's no standard specification for CSV.Īdded to that, Microsoft does not have much incentive to ensure interoperability between their version of CSV and Drupal's version, and so it is not surprising that they do not offer any (direct) way to encapsulate the contents of cells with single quotes within double quotes, so you've got to do something a bit more complicated if you want Excel to output Drupal-friendly CSV files.
