[CentralOH] Python & Win32 COM on Windows 7, Office 2010

Joshua Kramer josh at globalherald.net
Wed Oct 6 06:01:39 CEST 2010


Actually, you may want to investigate using IronPython and direct 
interfaces to Excel objects instead of using - *shudder* - COM objects.  
IronPython provides a native Python implementation on top of .NET, so 
you get all of the benefits that come with .NET.

(And if the me of 7 years ago would see the me of now noting the 
benefits of .NET I would slap me silly!)

On 10/05/2010 11:20 PM, Eric Floehr wrote:
> I've heard a rumor that Python works better, generally, on non-Windows 
> platforms. ;-)
>
> But, granted, Office and most games work better on Windows.
>
> I choose Python!
>
>
> On Tue, Oct 5, 2010 at 8:38 PM, James - Atlantix 
> <james at atlantixeng.com <mailto:james at atlantixeng.com>> wrote:
>
>     I am having some real problems getting proven, existing code
>     written in Python 2.5 to work with Excel 2010 and Windows 7. It is
>     a bit of a nightmare.
>
>     For example, the code below works in 2003/2007 Office/Excel, but
>     not in 2010!
>
>     import win32com.client
>
>     from win32com.client import gencache
>
>     gencache.EnsureModule('{91D6BD00-246D-11D2-8643-3AE4EC000000}', 0,
>     3, 7) ß This code references the CLSID of Excel; this is for
>     consistent opening of the app
>
>     global x1
>
>     x1 = win32com.client.Dispatch('Excel.Application')
>
>     x1.Workbooks.Open('C:/DROPBOX/My
>     Dropbox/LIBRARIES/Python/PADS_Project/test_excel.xls')
>
>     Right now I am trying to find the CLSID for Excel by calling
>     Microsoft, it has only cost an hour and 4 tech support people to
>     get where someone can go look up the number. I hope they can find it.
>
>     Thanks,
>
>     James
>
>
>     _______________________________________________
>     CentralOH mailing list
>     CentralOH at python.org <mailto:CentralOH at python.org>
>     http://mail.python.org/mailman/listinfo/centraloh
>
>
>
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> http://mail.python.org/mailman/listinfo/centraloh
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20101006/bb35d583/attachment.html>


More information about the CentralOH mailing list