# Export to Excel

**URL:** <https://forum.inductiveautomation.com/t/export-to-excel/10657>\
**Category:** Ignition\
**Created:** [October 23, 2015, 3:28pm UTC](https://forum.inductiveautomation.com/t/export-to-excel/10657 "2015-10-23T15:28:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [October 23, 2015, 3:28pm UTC](https://forum.inductiveautomation.com/t/export-to-excel/10657/1 "2015-10-23T15:28:52Z")

</div>

I have this script on a button but it doesn’t work.

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

```

when I push the button this happen  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/92cf9a8172c696d84ba1b331dcc8523faa90f040.png)

The excel was created but when I tried to open it it says It can’t read.

---

<div class="post-metadata">

**Author:** ![Chris\_Taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/chris_taylor/32/3315_2.png) [@Chris\_Taylor](https://forum.inductiveautomation.com/u/Chris_Taylor)\
**Post date:** [October 23, 2015, 3:36pm UTC](https://forum.inductiveautomation.com/t/export-to-excel/10657/2 "2015-10-23T15:36:44Z")

</div>

MoisesZV

you only want the table data

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

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [October 23, 2015, 3:46pm UTC](https://forum.inductiveautomation.com/t/export-to-excel/10657/3 "2015-10-23T15:46:45Z")

</div>

thanks now is working but still get this error “illegal character in authority at index 7” when I create the file.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 23, 2015, 5:30pm UTC](https://forum.inductiveautomation.com/t/export-to-excel/10657/4 "2015-10-23T17:30:18Z")

</div>

Things changed (in Java, I think) with how openURL works. It’s now a lot less friendly. 😕

Doug Keller had a working solution in [this post](https://inductiveautomation.com/forum/viewtopic.php?p=51745#p51745).

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [October 23, 2015, 6:45pm UTC](https://forum.inductiveautomation.com/t/export-to-excel/10657/5 "2015-10-23T18:45:03Z")

</div>

[quote=“JordanCClark”]Things changed (in Java, I think) with how openURL works. It’s now a lot less friendly. 😕

Doug Keller had a working solution in [this post](https://inductiveautomation.com/forum/viewtopic.php?p=51745#p51745).[/quote]

Thanks Jordan! that solved my problem.
