PDA

View Full Version : saerching CSV feed for keyword to add images


auspiral
10-26-2009, 04:01 PM
I've got a feed of hotels in the USA, and when I import it....it looks a little bare.

I would like to add images for the large hotel chains. So if it's a Hilton property the Hilton logo will be included in the post.

I only wanna do this for the top 20 or so hotel chains in the USA.

In one column I have the name of the hotel, which would contain the keyword for the hotel chain. What I need to do is search the field for a keyword, (like "Hilton" and then add the location of my Hilton Logo JPG to a new column for all the hotels that matched.


So what I'm asking is: is there any functionality within the plugin that would help me out here, or is just manipulating the data feed the way to go.

If playing around with my CSV file is the answer, is there any good way to search the csv, and when results are found create new data in a separate column?

I have about 70,000+ hotels, so doing it by hand really doesn't work.
I use excel a lot, but haven't run into this particular scenario where I need to find then add data into a different column.

Any suggestions would be greatly appreciated.

nickmattern
10-26-2009, 04:04 PM
I've got a feed of hotels in the USA, and when I import it....it looks a little bare.

I would like to add images for the large hotel chains. So if it's a Hilton property the Hilton logo will be included in the post.

I only wanna do this for the top 20 or so hotel chains in the USA.

In one column I have the name of the hotel, which would contain the keyword for the hotel chain. What I need to do is search the field for a keyword, (like "Hilton" and then add the location of my Hilton Logo JPG to a new column for all the hotels that matched.


So what I'm asking is: is there any functionality within the plugin that would help me out here, or is just manipulating the data feed the way to go.

If playing around with my CSV file is the answer, is there any good way to search the csv, and when results are found create new data in a separate column?

I have about 70,000+ hotels, so doing it by hand really doesn't work.
I use excel a lot, but haven't run into this particular scenario where I need to find then add data into a different column.

Any suggestions would be greatly appreciated.

No such functionality in the plugin. It's a garbage in/garbage out model with CSVs for any plugin/product.

I suggest you use a simple vlookup in Excel to match the appropriate jpgs to their respective hotel brands.

nickmattern
10-26-2009, 04:15 PM
If you need help with the vlookup, email the data to me at nickmattern@gmail.com and I'll help you out!

auspiral
10-26-2009, 04:20 PM
Is it possible to use the vlookup to search for the string within cell?

All the code and examples I'm finding are looking for exact matches.

For example, my hotel name datafield has entries like this:

Hilton Garden Inn Woodfield
Hilton on the Mag Mile
Hilton Garden Inn PHX airport


I would want to search for just the word Hilton in that column, and if found dump my image url in a different column.

So for any entry that has Hilton anywhere, I want "http://logo.jpg" added to a column I have setup for logo URLS.

Any ideas?

Thanks again

nickmattern
10-26-2009, 04:28 PM
Is it possible to use the vlookup to search for the string within cell?

All the code and examples I'm finding are looking for exact matches.

For example, my hotel name datafield has entries like this:

Hilton Garden Inn Woodfield
Hilton on the Mag Mile
Hilton Garden Inn PHX airport


I would want to search for just the word Hilton in that column, and if found dump my image url in a different column.

So for any entry that has Hilton anywhere, I want "http://logo.jpg" added to a column I have setup for logo URLS.

Any ideas?

Thanks again

I would say if the cell contains 'hilton' or 'ramada', etc., that the match could be made.

Whatever the case, Excel (or Access) should be able to get the data in the format you want!