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

Eric Floehr eric at intellovations.com
Wed Oct 6 05:20:13 CEST 2010


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>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
> http://mail.python.org/mailman/listinfo/centraloh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20101005/948de953/attachment.html>


More information about the CentralOH mailing list