# Export certain columns to excel sheet

**URL:** <https://forum.inductiveautomation.com/t/export-certain-columns-to-excel-sheet/5120>\
**Category:** Ignition\
**Created:** [September 7, 2012, 10:29pm UTC](https://forum.inductiveautomation.com/t/export-certain-columns-to-excel-sheet/5120 "2012-09-07T22:29:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamerplc](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tamerplc](https://forum.inductiveautomation.com/u/tamerplc)\
**Post date:** [September 7, 2012, 10:29pm UTC](https://forum.inductiveautomation.com/t/export-certain-columns-to-excel-sheet/5120/1 "2012-09-07T22:29:55Z")

</div>

I have this code to export table to excel sheet but i need to export certain column only for example column name 1,2,3,4,7 but no need for column 6

`table = event.source.parent.getComponent("AlarmTable")
filePath = system.dataset.exportExcel("V13211 RO AlarmTable.xls", 1, table.data)
if filePath != None:
   system.net.openURL("file://"+filePath)`

Thanks

---

<div class="post-metadata">

**Author:** ![dave.fogle](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dave.fogle](https://forum.inductiveautomation.com/u/dave.fogle)\
**Post date:** [September 7, 2012, 11:21pm UTC](https://forum.inductiveautomation.com/t/export-certain-columns-to-excel-sheet/5120/2 "2012-09-07T23:21:01Z")

</div>

I believe you'll have to create a new dataset from your original dataset in scripting that only includes the columns you need.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [September 7, 2012, 11:22pm UTC](https://forum.inductiveautomation.com/t/export-certain-columns-to-excel-sheet/5120/3 "2012-09-07T23:22:09Z")

</div>

You can find info about dealing with datasets in the user manual:  
[inductiveautomation.com/supp … atatyp.htm](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?working_with_different_datatyp.htm)

It’s a bit hacky, but you could also use the column selector component in the reporting plugin’s component palette for the same effect.
