mardi 28 juin 2016

Need help in parsing html tags in excel or any other method

I have over a thousand email addresses in the format below, placed in a column in excel 2007, like this:

<td class="Normal">street name1<br>street name 2<br>city, state zipcode<br>country<br>contact no</TD>

Some cells have different <br> tags like this:

<td class="Normal">street name 1<br>city, state postal<br>country</TD>

I can extract the last two tags using the excel "text to culumns" functions but the transformation is not consistent when extracted in columns and it will take forever to align each column to its right place.

The list all have "," to distinguish the street addresses, and I can use "text-to column' feature to extract all data before "," and then work on the first subset to get the data out. like this:

<td class="Normal">street name1<br>street name 2<br>city

I've searched all over the web and have gone through many formulas. Can't seem to extract text between two <br> tags.

Is there a way to extract between the two first <br> tags or a script to count the number of <br> tags and then use a script to extract each set of <br> tags in different columns, as some have one <br> tags and other have two <br> tags, in Excel.

please do suggest any other way or a tool that splits each in their respective columns.

Many Thanks. Haroon

Aucun commentaire:

Enregistrer un commentaire