Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    January 18th, 2005
    Posts
    100
    Ok I have this datafeed and some of it's subcategory values have unnecessary spaces. There is one space in front of the first letter and after the last letter. When I create my template and try to do IF comparison in HTML code, it doesn't work because it treats a value that has spaces in it differently. So how do I say in html code that a particular value has a space before its first letter and after its last letter? I tried and it didn't work. Any ideas on how to do this? I hope this makes sense..

    Thanks!

    The slogan "press on" has solved and always will solve the problems of the human race. ~Calvin Coolidge

  2. #2
    Full Member
    Join Date
    January 18th, 2005
    Posts
    413
    My approach would be to clean the datafeed. The downside of this is that you would have to clean the feed each time you downloaded a new one (or get the affiliate manager to upgrade the feed).

    There are a number of ways to clean out those spaces. Here is one approach working within Excel.

    1) Copy the Category column to a new spreadsheet

    2) Use Data, Text to Columns to split the category using "SPACE" as the delimiter. This will put those extra spaces into columns on their own.

    3) Use the concatenate funtion to recombine the category column without the extra spaces,
    e.g., the formula =(B1&" "&C1&" "&D1) would combine the information in columns B, C and D with two internal spaces.

    4) Copy and use the "paste special" function to reinsert the cleaned category column (as values) into your original datafeed.

    Have a Creative Day!
    FRANK, Baertracks
    Be More Creative

  3. #3
    Affiliate Manager
    Join Date
    January 18th, 2005
    Location
    Los Angeles, California
    Posts
    1,913
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by Raynor:
    Ok I have this datafeed and some of it's subcategory values have unnecessary spaces. There is one space in front of the first letter and after the last letter. When I create my template and try to do IF comparison in HTML code, it doesn't work because it treats a value that has spaces in it differently. So how do I say in html code that a particular value has a space before its first letter and after its last letter? I tried and it didn't work. Any ideas on how to do this? I hope this makes sense.. <HR></BLOCKQUOTE>

    That type of cleanup can be difficult to automate. If the data is inconsistent (i.e., some category values have leading spaces while others don't) this could also be a problem for the vendor supplying the feed, perhaps an indication of a problem with their database.

    It may be worthwhile bringing this to the attention of the merchant, who should be well motivated to clean up the data for smoother operations not only at your site but all of his affiliates' sites, and perhaps even his own.

    --
    Richard Gaskin
    Fourth World Media Corporation
    Developer of WebMerge: Publish any database on any site
    ___________________________________________________________
    Ambassador@FourthWorld.com http://www.FourthWorld.com
    Tel: 323-225-3717 AIM: FourthWorldInc

  4. #4
    Member
    Join Date
    January 18th, 2005
    Posts
    100
    Thanks a lot for your answers!

    Baertracks - it worked! I really didn't feel like going through each value and deleting those spaces! Would never figure it out how to do this on my own, thanks!

    The slogan "press on" has solved and always will solve the problems of the human race. ~Calvin Coolidge

    [This message was edited by Raynor on February 17, 2004 at 04:50 PM.]

  5. #5
    Newbie
    Join Date
    January 18th, 2005
    Posts
    14
    I have a problem with extra spaces too, but more complicated.

    What do you do if there is a extra trailing space after almost every field, but many of the fields contain multiple words? In other words I want to strip the trailing spaces, but not the spaces between words?

  6. #6
    Full Member
    Join Date
    January 18th, 2005
    Posts
    413
    Here are two ways to remove those extra trailing spaces:

    In Excel:

    1) Use find and replace to find "space space" and replace with "space". This will reduce the extra trailing spaces to one trailing space. Depending on the number of trailing spaces, you may have to do this a couple of times.

    2) Use "text to columns" to break the column using "space" as a delimiter.

    3) Recombine the fields using the concatentate function (described in another WM post) to insert spaces where you want them (with no trailing space).


    OR If you are a WordPerfect fan (like me) you can:

    1) Copy the column and special paste it into WP as test

    2) Use the WP "find a replace" to replace space[HRT] with [HRT]

    3) Run this a couple of times to remove all training spaces.

    4) Copy and repaste into your spreadsheet.

    In both cases you should make a backup of your spreadsheet first!

    Have a Creative Day!
    FRANK, Baertracks
    Be More Creative

  7. #7
    Newbie
    Join Date
    January 18th, 2005
    Posts
    14
    First of all, thank for the help!

    The wordperfect sollution worked, but I had to open my exported .txt file to see the hard returns, not copying from excel, and do the clean-up there.

    Yes!

    [This message was edited by jsegal on March 08, 2004 at 06:27 PM.]

  8. #8
    Full Member
    Join Date
    January 18th, 2005
    Posts
    413
    Sorry, but I don't quite see what the problem is with your data and the separations.

    I also don't understand why you would lose data like that. Are the 6000 records currently in Excel?

    try copying and pasting everything back into notepad and then back into Excel. Notepad has a great "cleansing" effect on data.

    Have a Creative Day!
    FRANK, Baertracks
    Be More Creative

  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Text Link Spaces
    By KYTaph in forum Commission Junction - CJ
    Replies: 11
    Last Post: July 24th, 2010, 07:45 PM
  2. Spaces
    By Howard Gottlieb in forum Search Engine Optimization
    Replies: 1
    Last Post: July 22nd, 2007, 11:13 PM
  3. Get rid of blank spaces
    By impact in forum WebMerge (Fourthworld.com)
    Replies: 2
    Last Post: January 24th, 2006, 08:45 PM
  4. Blank spaces in Links?
    By dak142 in forum WebMerge (Fourthworld.com)
    Replies: 5
    Last Post: June 5th, 2004, 06:30 PM

Posting Permissions

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