
January 25th, 2013, 03:07 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 4
Time spent in forums: 40 m 3 sec
Reputation Power: 0
|
|
|
Execute a Python Script from Excel
Hi,
I was not sure if this belonged in this forum - so apologies if I have posted in the wrong area.
I have a Python script which works perfectly and execeutes when I double click in Windows Explorer. I would like to execute the script when I click a button in my Excel spreadsheet.
In my Excel VBA I have used the following command:-
Call Shell(pyPath & pyFile)
pypath ="C:\Python26\python.exe "
pyFile ="script.py"
However, when the code runs I can see the Python icon flash up in my task bar but the script does not run/execute, if I exclude the 'pyFile', the Python interface opens. Can you please tell me where I am going wrong?
Thanks.
|