View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Steve127 Steve127 is offline
external usenet poster
 
Posts: 3
Default taking "strip html" to the next level

Thank you Ron - I'll give both a try and let you know.

To clarify:

I'm working on an export from a MySQL table. The database is part of
a shopping cart system. I inherited the database from person(s) who
input the product data with a lot of deprecated and non-validating
HTML. I am trying to remove all those tags.

As an example:

Suppose column D cells contain 'product_desc' data which are the cells
that have the bad HTML. Using the script from the original poster,
you double click the cell (say D3). In the popup text box you see the
text that is in D3, except the HTML tags are gone. What I do then is
CTRL-A, then CTRL-C, click the command button, and paste back into
D3. That gives me what I'm looking for - same product description
without HTML tags and database/table integrity.

One table alone has over 15,000 rows and 3 fields (or columns) with
bad HTML so you can imagine the routine will take me a very long time
to finish.

There might be a way to do this same thing inside MySQL, but I'm less
proficient at it than I am Excel! :) I can do write basic data
queries, but writing something to remove HTML tags would be way over
my head.

Anyway, hope that gives some insight into my problem (roadblock
really).

BTW...I messed around with the original script and managed to get it
to auto-paste the 'good' text into the cell after clicking the command
button, but I still have to do CTRL-A & CTRL-C. I gave both of those
a shot but kept getting into runtime errors and so forth and it
quickly got past my skill level.

Thank you