cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Karlos
Solution Sage
Solution Sage

Removing HTML tags complex

Hi all,

 

Thanks for looking. I’ve already tried the customer column “HTML.Table” it’s it’s still really messy. In short, I need help converting something similar to the following:

 

"<div class=""ExternalClass9254C4569EB64875A3EF9B11D59EE81C""><div style=""font-family&#58;Calibri, Arial, Helvetica, sans-serif;font-size&#58;11pt;color&#58;rgb(0, 0, 0);""><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;""><span style=""font-size&#58;10.0pt;font-family&#58;&quot;Segoe UI&quot;,sans-serif;color&#58;#444444;"">EDRM@Work consultant completed testing and confirmed additional work needs to be completed

and charged for.&#160;</span></p><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;background-color&#58;rgba(255, 226, 223, 0.5);""><span style=""font-size&#58;10.0pt;font-family&#58;&quot;Segoe UI&quot;,sans-serif;color&#58;#444444;"">Business continued with UAT? and liasing with project team and

issues encountered all parties continued to work together to resolve.&#160;</span></p><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;background-color&#58;rgba(255, 226, 223, 0.5);""><span style=""font-size&#58;10.0pt;font-family&#58;&quot;Segoe UI&quot;,sans-serif;color&#58;#444444;"">Scanner issue requires instructions from Test on how to configure to work with the software, but this will only give CSU one working scanner.&#160; The other scanners are not compatible with Windows 10 following the upgrade from Win 7 to Win 10.&#160;</span></p><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;background-color&#58;rgba(255, 226, 223, 0.5);""><span style=""font-size&#58;10.0pt;font-family&#58;&quot;Segoe UI&quot;,sans-serif;color&#58;#444444;"">Continued to feedback the ongoing test issues and new issues to Test with zero or slow and poor response on the problems being encountered</span></p><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;background-color&#58;rgba(255, 226, 223, 0.5);""><span style=""font-size&#58;10.0pt;font-family&#58;&quot;Segoe UI&quot;,sans-serif;color&#58;#444444;"">Continue to endeavour to get&#160;Test to provide free

consultancy to assist IT in configuring the settings globally for users and all

the other issues raised as a result of the testing.?</span></p><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;background-color&#58;rgba(255, 226, 223, 0.5);""><span style=""font-size&#58;10.0pt;font-family&#58;&quot;Segoe UI&quot;,sans-serif;color&#58;#444444;"">Review of the major issues raised in testing took place with IT.&#160; PM will be issuing an Exception Report to PCC Governance, with options on the best way forward. as&#160;</span><span style=""color&#58;rgb(68, 68, 68);font-family&#58;&quot;Segoe UI&quot;, sans-serif;font-size&#58;10pt;"">Go Live date of 7/8 August is not looking feasible, but Test

have advised the next available date for Go Live would be January 2021!</span></p><p style=""margin-right&#58;0cm;margin-left&#58;0cm;font-size&#58;12pt;font-family&#58;&quot;Times New Roman&quot;, serif;margin-top&#58;0cm;margin-right&#58;0cm;margin-bottom&#58;7.5pt;margin-left&#58;0cm;background-color&#58;rgba(255, 226, 223, 0.5);""><br></p><br></div></div>"

 

Into this:

"EDRM@Work consultant completed testing and confirmed additional work needs to be completed and charged for. Business continued with UAT and liasing with project team and issues encountered all parties continued to work together to resolve. Scanner issue requires instructions from Test on how to configure to work with the software, but this will only give CSU one working scanner.  The other scanners are not compatible with Windows 10 following the upgrade from Win 7 to Win 10. Continued to feedback the ongoing test issues and new issues to Test with zero or slow and poor response on the problems being encountered. Continue to endeavour to get Test to provide free consultancy to assist IT in configuring the settings globally for users and all the other issues raised as a result of the testing. Review of the major issues raised in testing took place with IT.  PM will be issuing an Exception Report to PCC Governance, with options on the best way forward. as Go Live date of 7/8 August is not looking feasible, but Test have advised the next available date for Go Live would be January 2021!"

 

I can't seem to figure out a way to get it convert nicely. Any suggestions would be be welcomed. 

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @Karlos ,

 

Try this code:

 

Text.Combine(List.Transform(Html.Table([Column1], {{"div", "span"}})[div], each Text.Clean(_)), " ")

 

Capture.PNG

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

4 REPLIES 4
camargos88
Community Champion
Community Champion

Hi @Karlos ,

 

Try this code:

 

Text.Combine(List.Transform(Html.Table([Column1], {{"div", "span"}})[div], each Text.Clean(_)), " ")

 

Capture.PNG

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

Hey That's kinda odd, I can see on your screenshot that that has worked for you, however, with my data it's throwing in "_x000D_" (4 times) here and there? apart from that, it works perfectly. Any suggestions on how to avoid it adding"_x000D_" or shall I just use a find and replace to shift it? 

camargos88
Community Champion
Community Champion

@Karlos ,

 

Do you have any different character in this column from the previous post ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Actually yeah, Just checking and this was an issue my end. Thanks for the brilliant solution. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.