+ Reply to Thread
Results 1 to 2 of 2

Conditional removal of quotes

  1. #1
    Registered User
    Join Date
    11-18-2009
    Location
    Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    6

    Conditional removal of quotes

    This is an annoying problem. I have to import data into a program as a .txt file. The program has a bug and does not recognize quotes that protect values with commas from real quotes within values. So any value with a comma comes in with quotes and any value with quotes goes in with double quotes. They have acknowledged that this is a bug in their import utility and it may or may not get fixed in the next version

    So in the meantime, I have to import several files containing information that may or may not have quotes and or commas that would cause "tricky" quotes. Is there a VB script I can run on the .txt file or any other ideas you may have for removing quotes that have soley been put in to preserve values containing commas? Here is an example of my data:

    Primary Key Description
    100 Man with dog, Mt. Tamalpais in background
    101 "Titanic"
    102 Originial, "Man with head dress, Inuit"

    In the .txt file it appears (as it should)
    Primary Key Description
    100 "Man with dog, Mt. Tamalpais in background
    101 ""Titanic""
    102 "Original, ""Man with head dress, Inuit"""

    So basically, I want to be able to save this file as a .txt file without the embedded delimited quotes but keep the original quotes originally in the values.

    Any help or ideas would be greatly appreciated.

    Thanks,
    Chris
    Last edited by Datagrunt; 11-25-2009 at 07:47 PM. Reason: Solved

  2. #2
    Registered User
    Join Date
    11-18-2009
    Location
    Bay Area
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Conditional removal of quotes

    I think I found a quick workaround. I just copied and pasted the data from the excel sheet into a blank .txt file in Notepad++ and voila! no quotes. Hope this helps someone who may have the same problem.

+ 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