# System.util.execute() to pass parameters into excel file

**URL:** <https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938>\
**Category:** Ignition\
**Created:** [May 21, 2020, 2:16pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938 "2020-05-21T14:16:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliot.lohr](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@elliot.lohr](https://forum.inductiveautomation.com/u/elliot.lohr)\
**Post date:** [May 21, 2020, 2:16pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938/1 "2020-05-21T14:16:12Z")

</div>

Hi everyone, I am a shell execute noob. I am trying to run an execute from Ignition to pass a string of 2 numbers into an excel file. in particular this script which i’ve run :

```auto

excel.exe /e "c:\Book5.xlsm" /p "3,1"

```

I’ve tried

```auto
commands = ['excel.exe',"C:\Book5.xlsm /p 3,1"]

system.util.execute(commands)

```

```auto
commands = ['excel.exe /e "c:\Book5.xlsm" /p "3,1"']
system.util.execute(commands)

```

Typically I get an error saying specified file is unable to be found. Any help on this issue would be appreciated!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 21, 2020, 2:33pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938/2 "2020-05-21T14:33:18Z")

</div>

Backslashes are escapes in python quoted strings. Try doubling them up. Or just switch them to forward slashes.

---

<div class="post-metadata">

**Author:** ![elliot.lohr](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@elliot.lohr](https://forum.inductiveautomation.com/u/elliot.lohr)\
**Post date:** [May 21, 2020, 2:54pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938/3 "2020-05-21T14:54:55Z")

</div>

Thanks for the help. I tried but oddly I’m not even able to open an excel file using this:

```auto
commands = ['excel.exe' , "C:\\Book5.xlsm"]

```

I tried doing some sanity checks using .txt files as shown on the [Ignition manual](https://docs.inductiveautomation.com/display/DOC80/system.util.execute) for system.util.execute and they passed, however whenever trying to open excel file I get:

```auto
Traceback (most recent call last):
  File "<event:actionPerformed>", line 11, in <module>
java.io.IOException: java.io.IOException: Cannot run program "excel.exe": CreateProcess error=2, The system cannot find the file specified

	caused by IOException: Cannot run program "excel.exe": CreateProcess error=2, The system cannot find the file specified
	caused by IOException: CreateProcess error=2, The system cannot find the file specified

```

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [May 21, 2020, 2:56pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938/4 "2020-05-21T14:56:09Z")

</div>

You may need to put the full path to excel in there.

---

<div class="post-metadata">

**Author:** ![elliot.lohr](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@elliot.lohr](https://forum.inductiveautomation.com/u/elliot.lohr)\
**Post date:** [May 21, 2020, 3:41pm UTC](https://forum.inductiveautomation.com/t/system-util-execute-to-pass-parameters-into-excel-file/34938/5 "2020-05-21T15:41:22Z")

</div>

Thanks guys, both of these solutions were helpful!
