Skip to Content
Menu
This question has been flagged
1 Reply
402 Views

How do I get rid of HTML tags from a list that have placed into a spreadsheet.

Avatar
Discard
Best Answer

Hello Alan
The Easiest Method: REGEXREPLACE (or REGEX in LibreOffice)

  1. Open your spreadsheet (Google Sheets, Excel, or LibreOffice Calc).
  2. Find an empty column next to your data. Let's say your messy text is in column A.
  3. In the first cell of the empty column (e.g., B1), type this formula:
    • Google Sheets or Excel: =REGEXREPLACE(A1,"<[^>]*>","")
    • LibreOffice Calc: =REGEX(A1,"<[^>]*>","")
  4. Press Enter. The cell should now show the text from A1, but without the HTML tags.
  5. Copy the formula down: Click on the cell with the formula (B1), then drag the little square at the bottom right corner of the cell down to apply the formula to all the rows in your data.
  6. Copy and Paste the Clean Text:
    • Select the entire column with the cleaned text (e.g., column B).
    • Copy the data (Ctrl+C or Cmd+C).
    • Go to where you want the clean text to be.
    • Paste as Values Only: This is important!
      • Google Sheets: Edit -> Paste special -> Paste values only
      • Excel: Right-click -> Paste Special -> Values
      • LibreOffice Calc: Edit -> Paste Special -> Unformatted Text

That's it! You should now have a clean copy of your text without any HTML tags.

Why this is the easiest:

  • Simple Formula: The REGEXREPLACE (or REGEX) formula is relatively easy to understand and use.
  • No Coding: It doesn't require any programming or complex steps.
  • Works in Most Spreadsheets: It works in Google Sheets, recent versions of Excel, and LibreOffice Calc.

If that doesn't work...

If you're using an older version of Excel or if the REGEXREPLACE function doesn't seem to be working, the next easiest option is to use the SUBSTITUTE function to remove specific HTML tags one at a time. However, this is more tedious if you have a lot of different tags.

🚀 Did This Solve Your Problem?

If this answer helped you save time, money, or frustration, consider:

✅ Upvoting (👍) to help others find it faster

✅ Marking as "Best Answer" if it resolved your issue

Your feedback keeps the Odoo community strong! 💪

(Need further customization? Drop a comment—I’m happy to refine the solution!)

Avatar
Discard