Which way is best to execute a Python script in Excel?
t at jollybox.de
Thu Jul 5 11:12:37 CEST 2012
On 07/05/2012 09:26 AM, Karim wrote:
> Look at PyUNO from OpenOffice very large API:
> I use to create all my documention (Excell, Writer, etc...) on this API.
Note that this API is for OpenOffice, not Microsoft Excel. However, as
you probably know, you can open most Excel files in OpenOffice's Calc.
I urge you to consider LibreOffice, a fork of OpenOffice that is now
broadly considered its successor. Its API can also be used in Python
If you want to program Microsoft Office, your only option is, as far as
I know, VBA, but it may be possible to call Python from VBA using the
Windows Script Host. I assume that the Windows Script Control uses this,
but I doubt that's much easier to use than the standard WScript API.
(then again, I wouldn't know)
All in all, if you're going to script Microsoft office, by far the
easiest way is to simply stick to VBA and forget about Python in this
particular environment. If it's an option, try LibreOffice.
More information about the Python-list