Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Rendering HTML in exported lists into XLS/Excel format - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Rendering HTML in exported lists into XLS/Excel format
KB0683363

Rendering HTML in exported lists into XLS/Excel format


10720 Views Last updated : May 26, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

HTML fields display with HTML Tags when exported and rendered in Excel format from List view:

  1. Navigate to any list view which has an HTML Field.
  2. Right-click on the headers
  3. Export > Excel (.xlsx)
  4. Observe the content of the row after downloading it into the Excel file.

Export Excel

Release

All releases

Cause

This ability to hide HTML Tags is currently not a part of the product.

Resolution

Use Visual Basic Editor in Excel to clean the exported content.

The code to change a column from HTML to plain text can be something like this:

 

Sub StripTags()

      Dim cell               As Range

      Dim s                     As String

      Dim asWd()           As String

      Dim iWd                 As Long

 

      For Each cell In Intersect(Selection.Cells, ActiveSheet.UsedRange)

              s = Replace(cell.Value, Chr(160), " ")

              s = Replace(s, ">", "<")

              s = Replace(s, vbCr, vbLf)

   

              asWd = Split(s, "<")

              s = vbNullString

              For iWd = 0 To UBound(asWd) Step 2

                      s = s & " " & asWd(iWd)

              Next iWd

 

              Do While InStr(s, vbLf & " ")

                      s = Replace(s, vbLf & " ", vbLf)

              Loop

 

              Do While InStr(s, vbLf & vbLf)

                      s = Replace(s, vbLf & vbLf, vbLf)

              Loop

   

              cell.Value = WorksheetFunction.Trim(s)

      Next cell

End Sub

 

Related Links

See more extensive details and instructions in the community post Rendering HTML in Exported Lists.

Documentation pages: List export. 


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.