Save as Spreadsheet shows field HTML coding

  • 0
  • 2
  • Question
  • Updated 9 months ago
  • Answered
I currently have a formula field that includes HTML coding in order to highlight just the cell green (rather than the whole row) when the value is 100%. That works fine, however, when my users export the report using Save as Spreadsheet, all the HTML code appears in the CSV. Is there a way to remove or hide the HTML code for exporting and only show the actual value?

Here is my code:

var number trad=Round([% Stage 1 Complete_calc]*100); 

var number percent=[% Stage 1 Complete_calc];

var text sign="%"; 

If($percent>0.995, "<div style=\"color:black;background-color:#19b319;font-weight:bold;text-align: center;\"> " & $trad & $sign & "<div>", "<div style=\"color:black;font-weight:bold;text-align:center\"> " & $trad & $sign & "<div>")
Photo of Michael

Michael

  • 20 Points

Posted 3 years ago

  • 0
  • 2
Photo of Harrison Hersch (MCF)

Harrison Hersch (MCF), Champion

  • 40 Points
Not natively. The best suggestion would be to have a plain text representation of the field and train users to either swap the field out on the report before download, or have two versions of the report.
Photo of Ryan

Ryan

  • 88 Points 75 badge 2x thumb
Harrison, how can this be accomplished? 

When I create a Formula - Text field and set it equal to the Rich Text field, it also has HTML characters.


Photo of Ryan Stanford

Ryan Stanford

  • 1,692 Points 1k badge 2x thumb
An option is to have a URL Button, which could link to a report, and that report has the same filter logic, and same columns (or maybe have a plain text field equivalent without the html text) and have this reports format to be "Comma Separated Values" which instead of viewing, it instantly downloads this report onto the local computer.

Hope this helps