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>
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 – 2015-10-09T11:58:18.560Or, to further CharlieRB, see http://www.digocodigo.com/2012/03/code-to-strip-html-tags-in-notepad-and.html
– Dave – 2015-10-09T12:18:15.790Thanks for your answer CharileRB, What I mean with "converted to just text" is to have the tags striped and also text formated. – secuaz – 2015-10-09T12:30:16.723
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 – 2015-10-12T16:22:33.817