# Export Table created by SQL Query

**URL:** <https://forum.inductiveautomation.com/t/export-table-created-by-sql-query/7765>\
**Category:** Ignition\
**Created:** [December 30, 2013, 3:17pm UTC](https://forum.inductiveautomation.com/t/export-table-created-by-sql-query/7765 "2013-12-30T15:17:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [December 30, 2013, 3:17pm UTC](https://forum.inductiveautomation.com/t/export-table-created-by-sql-query/7765/1 "2013-12-30T15:17:13Z")

</div>

Is there a quick and easy way to put a link on a page to download a table, kinda like the easyh chart does?

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 30, 2013, 4:21pm UTC](https://forum.inductiveautomation.com/t/export-table-created-by-sql-query/7765/2 "2013-12-30T16:21:27Z")

</div>

Add a button to the screen and put this script in the actionPerformed event handler:

```auto
table = event.source.parent.getComponent('Table')
system.dataset.exportExcel("tableExport",True,table.data)
```

You can also use these:  
system.dataset.exportCSV  
system.dataset.exportHTML

---

<div class="post-metadata">

**Author:** ![tbackus](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tbackus/32/5091_2.png) [@tbackus](https://forum.inductiveautomation.com/u/tbackus)\
**Post date:** [December 30, 2013, 6:57pm UTC](https://forum.inductiveautomation.com/t/export-table-created-by-sql-query/7765/3 "2013-12-30T18:57:56Z")

</div>

Awesome!! Thanks!

---

<div class="post-metadata">

**Author:** ![Dilan](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@Dilan](https://forum.inductiveautomation.com/u/Dilan)\
**Post date:** [June 8, 2017, 10:43am UTC](https://forum.inductiveautomation.com/t/export-table-created-by-sql-query/7765/4 "2017-06-08T10:43:00Z")

</div>

Thanks guys, I ended up using this, worked great for me!
