+ Reply to Thread
Results 1 to 4 of 4

Concatenate with comma, then export to text. BORKE!

  1. #1
    Registered User
    Join Date
    09-25-2006
    Posts
    2

    Concatenate with comma, then export to text. BORKE!

    I'm up against a truly mind-boggling issue.

    I'm attempting to create a dynamic config file in Excel that will be used by an application. This file needs to be strictly formatted. Here's a dummy example:

    Please Login or Register  to view this content.
    The file needs to export as a .txt.file. I have this working 99% of the way.
    My difficulty is that the resulting file looks like this:

    Please Login or Register  to view this content.
    For the domain,hostname, I'm actually concatenating the domain and comman to the front of the hostnames from an external source. If I change the comma to something else, like a + (plus), I do not get the quotes. The issue is that the application I'm dropping this config file into requires the comma and I can't use anything else.

    I suspect Excel is trying to be helpful by specifying the literal string whenever there's a comma. I do NOT want it to do this. I can't figure out how to prevent it, however.

  2. #2
    Forum Contributor
    Join Date
    12-14-2005
    Posts
    176
    Open the file in Word and then do a find and replace:
    In the Find box - enter " and then leave the replace box empty - then save the file as Text.

  3. #3
    Registered User
    Join Date
    09-25-2006
    Posts
    2
    I'm trying to automate a weekly process that already involves manual cleanup. If I have to open the file in Word or Wordpad, I might as well not bother doing the other stuff in Excel.

    There has to be a way to prevent Excel from putting the quotes in the export. I'm not exporting a .CSV file, so there's no reason for Excel to qualify a string that has a comma in it.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by ThinkandDrive
    I'm trying to automate a weekly process that already involves manual cleanup. If I have to open the file in Word or Wordpad, I might as well not bother doing the other stuff in Excel.

    There has to be a way to prevent Excel from putting the quotes in the export. I'm not exporting a .CSV file, so there's no reason for Excel to qualify a string that has a comma in it.
    In your example data Excel saving as a .csv file would not enclose data in quotes. If your data ever contains a quote then the suggested substitution could be fatal.

    In Excel, remove anything that causes quotes (like commas in data or quotes etc - if you don't need these) and output as a .csv file

    ---

+ 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