# HTML Export Adding Line Breaks in Headers

**URL:** <https://forum.inductiveautomation.com/t/html-export-adding-line-breaks-in-headers/85982>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [February 20, 2024, 2:18am UTC](https://forum.inductiveautomation.com/t/html-export-adding-line-breaks-in-headers/85982 "2024-02-20T02:18:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa\_Al-Shawaf](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@Mustafa\_Al-Shawaf](https://forum.inductiveautomation.com/u/Mustafa_Al-Shawaf)\
**Post date:** [February 20, 2024, 2:18am UTC](https://forum.inductiveautomation.com/t/html-export-adding-line-breaks-in-headers/85982/1 "2024-02-20T02:18:28Z")

</div>

Hello All,

I have a dataset that I am converting to html for a quick export. I would like to insert line breaks for new lines in the header, but I am having difficulty.

For example:

```auto
data_param = system.db.runQuery("""SELECT id, machine, feederpressure as "Feeder<BR>Pressure", pressureaddon as "Pressure<BR>Add On" from table ORDER BY id;""")
html = system.dataset.dataSetToHTML(True, data_param, "Machine Parameters Table")
system.perspective.download("export.html", html)

```

My html file header is then:

id | machine | Feeder\<BR\>Pressure | Pressure\<BR\>Add On

It seems like the converter is "too smart" and is automatically converting text that could be interpreted as html into special characters such that it renders. Is there a way I can achieve the desired result?

Thanks.

---

<div class="post-metadata">

**Author:** ![Mustafa\_Al-Shawaf](https://avatars.discourse-cdn.com/v4/letter/m/d2c977/32.png) [@Mustafa\_Al-Shawaf](https://forum.inductiveautomation.com/u/Mustafa_Al-Shawaf)\
**Post date:** [February 21, 2024, 1:20pm UTC](https://forum.inductiveautomation.com/t/html-export-adding-line-breaks-in-headers/85982/2 "2024-02-21T13:20:46Z")

</div>

I did find a solution that works for me. It is not particularly clean, but I thought I would post it here in case anyone else can use it.

```auto
data_param = system.db.runQuery("""SELECT id, machine, feederpressure, pressureaddon from table ORDER BY id;""")
html = system.dataset.dataSetToHTML(True, data_param, "Machine Parameters Table")
html = html.replace("<TH>feederpressure</TH>", "<TH>Feeder<BR>Pressure</TH>")
html = html.replace("<TH>pressureaddon</TH>", "<TH>Pressure<BR>Add On</TH>")
system.perspective.download("export.html", html)

```
