Loading

Salesforce Report Export Contains Decoded HTML Tags

Publiceringsdatum: May 6, 2026
Beskrivning

In Salesforce, when exporting reports that contain formula fields that render HTML output — such as hyperlinks, email addresses, or images — the exported file (CSV or Excel) contains the underlying HTML tags rather than the rendered output.
This occurs because the Salesforce report export renders formula output values exactly as they appear in the user interface. When a formula renders HTML, those HTML tags are included in the export.
Example:
A formula field using the HYPERLINK function — for example, a formula that produces a hyperlink to " with the display label "Google" and target "_self" — displays as a clickable link labeled "Google" in the Salesforce user interface.
When the same report is exported, the export file contains the raw HTML markup: an anchor element with href set to " target set to "_self," and inner text "Google" — rather than just the word "Google."


 

Formula

HYPERLINK("https://www.google.com", "Google", "_self");


Export Result

<a href="http://www.google.com" target="_self">Google</a>
Lösning

Expected Behavior in Salesforce Report Exports

This is expected behavior in Salesforce. The report export renders the formula output exactly as it appears in the user interface, including any HTML markup from HYPERLINK, email, or image formulas.

Workaround for HTML Tags in Report Exports

To get a report export that contains only the URL value or email address (without HTML tags), use the corresponding Salesforce custom field types instead of formula fields:

  • For email addresses: Use the Email field type. This field type exports as a plain email address without HTML encoding.
  • For web links/URLs: Use the URL field type. This field type exports as a plain URL without HTML encoding.

Using dedicated Email and URL field types instead of HYPERLINK formula fields ensures the exported report contains clean, readable values.

Ytterligare resurser

Custom Field Types

Knowledge-artikelnummer

000382893

 
Laddar
Salesforce Help | Article