# Triggering "Save data for Excel" button from a script

**URL:** <https://forum.inductiveautomation.com/t/triggering-save-data-for-excel-button-from-a-script/9398>\
**Category:** Ignition\
**Created:** [December 2, 2014, 9:51am UTC](https://forum.inductiveautomation.com/t/triggering-save-data-for-excel-button-from-a-script/9398 "2014-12-02T09:51:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amarth](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarth/32/3313_2.png) [@Amarth](https://forum.inductiveautomation.com/u/Amarth)\
**Post date:** [December 2, 2014, 9:51am UTC](https://forum.inductiveautomation.com/t/triggering-save-data-for-excel-button-from-a-script/9398/1 "2014-12-02T09:51:12Z")

</div>

Hello,

Is it possible to trigger the “Save data for Excel” function of an Easy Chart from another button (not the component in-built one but another one, placed on the window)?  
I looked for a special scripting function of the Esay Chart (such as the doClick() for a button) but could not find anything.

Regards.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 2, 2014, 6:05pm UTC](https://forum.inductiveautomation.com/t/triggering-save-data-for-excel-button-from-a-script/9398/2 "2014-12-02T18:05:01Z")

</div>

`easyChart = event.source.parent.getComponent('Easy Chart')
easyChart.exportExcel('myFileName.xls');` worked for me when placed in a button…

---

<div class="post-metadata">

**Author:** ![Amarth](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarth/32/3313_2.png) [@Amarth](https://forum.inductiveautomation.com/u/Amarth)\
**Post date:** [December 3, 2014, 11:00am UTC](https://forum.inductiveautomation.com/t/triggering-save-data-for-excel-button-from-a-script/9398/3 "2014-12-03T11:00:31Z")

</div>

It worked for me too. Thank you.
