+ Reply to Thread
Results 1 to 3 of 3

Preserving " (double quotes or in this case inch symbol) in csv files

  1. #1
    Registered User
    Join Date
    07-08-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    1

    Preserving " (double quotes or in this case inch symbol) in csv files

    Appreciate very much any assistance:

    I have csv files that I sometimes open in Excel to manipulate and then save as csv files. Sometimes a field within a record will contain text with the " symbol embedded (denoting as the subject implies inches). After saving as .csv or .txt for that matter Excel adds double quotes around the text. Example follows: (Output underlined for clarity)

    Original Field contents: FD 1"IP OPEN (I would like to preserve this)

    After saving: "FD 1" "IP OPEN" (The program that uses this data then interprets this as FD 1, discarding the IP OPEN portion)

    I have searched until I can't search anymore for a setting or workaround to accomplish this. Any suggestions? Of course if you open the file with excel that field looks fine, but if opened with notepad or other ascii editor you see the quotes that excel has inserted.

    Probably simple solution (I hope)

    Cheers - Norman

  2. #2
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Preserving " (double quotes or in this case inch symbol) in csv files

    If you want to get rid of the double quotes altogether and have no quotes except the one's within the field
    then try saving the file as a .PRN file which is listed as Formatted Text ( Space Delimited )
    The down side is you have no field delimiters.

  3. #3
    Forum Contributor
    Join Date
    04-07-2009
    Location
    Rowley
    MS-Off Ver
    Excel 2007
    Posts
    326

    Re: Preserving " (double quotes or in this case inch symbol) in csv files

    To expand on this a bit, when I said:

    The down side is you have no field delimiters.

    That is not actually true.
    You could add your own delimiters, if you choose.

    You could add them into the cell at the time of entry but then you have to live with the delimiter in your text cells.
    A simpler way would be with a Custom Format, then you can in effect turn the delimiters on or off.
    When you need to export the file, use the Custom Format
    when your done just convert the cells back to Text Format.

    For a Custom Format to add the delimiters something like:

    If you want to keep with the Double Quote then design your Custom Format like: \"@\"
    If you want something a bit more noticeable then you could use Hash Marks: \#@\#
    For a mix and match something like: \#@\]

    Just note that there are NO Spaces in the custom format.

    Also, you should be aware that the .PRN has a limitation of 240 characters per Row.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1