ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Format of CSV file not preserved when edited in Excel 2007 (https://www.excelbanter.com/excel-worksheet-functions/178923-format-csv-file-not-preserved-when-edited-excel-2007-a.html)

JBeckett

Format of CSV file not preserved when edited in Excel 2007
 
Here's my problem. I get a CSV file from a vendor that I need to edit. The
file comes in the following format:
"field1","field2","field3","field4"

After editing the file and saving as a CSV, my data looks like the following
in a text editor:
field1,field2,field3,field4

In order to send the file back to the vendor I need those quotation marks
back. I've tried importing the data and setting the text qualifier to {none},
which accomplishes the goal of preserving the quotation marks, however when I
save as a CSV file, my data comes out as so:
"""field1""","""field2""","""field3""","""field4"" "

Any input would be greatly appreciated.

Dave Peterson

Format of CSV file not preserved when edited in Excel 2007
 
Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)

Check out Earl's Text Write program first. It may do exactly what you want
right out of the box.

JBeckett wrote:

Here's my problem. I get a CSV file from a vendor that I need to edit. The
file comes in the following format:
"field1","field2","field3","field4"

After editing the file and saving as a CSV, my data looks like the following
in a text editor:
field1,field2,field3,field4

In order to send the file back to the vendor I need those quotation marks
back. I've tried importing the data and setting the text qualifier to {none},
which accomplishes the goal of preserving the quotation marks, however when I
save as a CSV file, my data comes out as so:
"""field1""","""field2""","""field3""","""field4"" "

Any input would be greatly appreciated.


--

Dave Peterson


All times are GMT +1. The time now is 11:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com