![Excel Excel](https://i.stack.imgur.com/88kXI.png)
The field has to be formatted as text (or a string). If a field is formatted as General, Number, Currency or so forth, excel will not add quotes around the field. Open the file in excel.
Good afternoon,I receive a file from a client that is supposed to be in CSV format, but it's coming across as one column.How can I use powershell to full break this one column u. [SOLVED] 'Text' CSV one column in Excel, Fix with powershell - Spiceworks. The Import-Csv cmdlet creates table-like custom objects from the items in CSV files. If the path includes escape characters, enclose it in single quotation marks.
Highlight the entire table of data. The above example just shows the first part of the table highlighted. You want to highlight the entire table that you have. Go to Format and click on Number: 4. The box below, or something similar, will appear. Click on Text (or string). By selecting Text, when you save as csv format, a field will save that 'field' with the quotes around that field.
Otherwise, excel will save your csv file as a comma-delimited file with no quotes. There is one frequent problem to be aware of but easy to resolve. What if you have no data in the field? Even if the field is formatted as text, Excel will save that field as nothing, with no quotes. You will have two commas next to each other. To resolve this, replace an empty field with one blank space. Then saving as csv will have this effect: ',' ',' instead of ',' I still can't get fields encapsulated by quotes.
Now what do I do? Open the csv file in notepad and go to Edit/Replace and replace, with ',' and that will put the quotes everywhere except the front and back. Then add those quotes on the front and back of each row. Or we offer where we can get your file in the format required to import.
We greatly appreciate feedback on any of our software products. Please send an e-mail to with any feedback or comments about any of our products or services.
Part of the problem here is that. Added 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 if you want Excel to output Drupal-friendly CSV files. Or, since Drupal is telling you where the problem is, you can do it manually. If you only have a few rows with apostrophes, then that may not be a big deal. If you have a lot of rows in your CSV with apostrophes or single quotes, then you've got a bit of pain. Alternately, if you've got Python on your machine, or are willing to install it, may work for you, and may be much easier than dealing with Excel macros.
It all depends on the languages and language environments you're comfortable with, however. 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. If you are of this opinion, you may want to file a request with the Feeds project. Since there is no (standard) CSV spec, this can't be considered a bug (AFAIK), but it does seem like a useful feature that they might want to add.