1

I have a column in Excel of descriptions. These descriptions are in HTML format, and need to have that HTML converted into plain text, by stripping out all the HTML tags.

I don't know my way around Excel, so the alternative I have investigated would be to use fgetcsv php function and html2text, and then export as Excel.

Probably this may be a long-winded solution if there is some setting/VBA code on Excel that would do the trick.

Any help very welcome.

Example of HTML data in Excel:

<p> <strong><span style="font-size: 16px"><u>Socket & See LTKIT10 Lamp Test Adaptor Kit</u></span></strong> </p> <p> This fantastic product from Socket & See is ideal for Electricians testing light fittings. </p> <p> The Socket & See LTKIT10 is five adaptors that allow for easy connection and testing at light fittings: </p> <p> LTBC 02, LTES 04, LTMBC 06, LTMES 08, LTGU 10 </p> <p> Presented with 2 x 120cm, 4mm test leads in a protective carry pouch. </p> <br/> 
<p> <strong>Features of Socket & See LTKIT10:</strong> </p> <ul> <li>Allows easy, safe connection to light fittings </li> <li>The fastest way to check insulation/continuity/loop/polarity </li> <li>High quality low ohn 4mm connectors </li> <li>Safer and saves time: leave the light fitting in place </li> <li>Easier/better connection allows hands-free </li> <li>No broken connections </li> <li>Great for use in awkward/high situations </li> <li>No damage to fittings</li></ul> <br/> <p> <strong>What's included:</strong> </p> 
<p> Bayonet Fitting, GU10, Small Edison Screw, Small Bayonet Fitting, Edison Screw Fitting, 2 x 120cm, 4mm Test Leads, Protective Carrier Pouch<br /> </p>
4
  • Welcome to Super User. It is unclear what you are asking. When you say "converted into just text", do you mean you want the remove HTML tags? Excel is not an HTML editor, so there are no special functions to remove tags. Have you tried Find & Replace?
    – CharlieRB
    Commented Oct 9, 2015 at 11:58
  • Or, to further CharlieRB, see digocodigo.com/2012/03/…
    – Dave
    Commented Oct 9, 2015 at 12:18
  • Thanks for your answer CharileRB, What I mean with "converted to just text" is to have the tags striped and also text formated.
    – secuaz
    Commented Oct 9, 2015 at 12:30
  • If you have the HTML formatted page you can import the data into excel using the “From Web” menu under Data > Get External Data group. The new Web Query Dialog pop up opens – type the URL and select import. Click the Yellow Arrows next to the tables that you would like to bring into Excel as text and Import.
    – Antony
    Commented Oct 12, 2015 at 16:22

1 Answer 1

1

Copy all tags and text, paste in a text file, change the extension file from txt to html, open with the browser, copy the contents from web page and paste in excel.

1
  • Not a practical solution is someone has hundreds or even thousands of rows of data.
    – O.M.Y.
    Commented Jul 8, 2016 at 19:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .