[python-win32] Cannot assign values to the Excel Colors property

Graham Bloice graham.bloice at trihedral.com
Wed Aug 25 11:38:47 CEST 2004


> Sorry, I'm still a beginner at Python and don't really understand what the
> MakePy utility is doing.  I started off playing with it last month and was
> able to generate a big Excel.py file but I couldn't import it or anything.
> Since your sample shows that the Dispatch function is using it somehow, I
> went back to the Web to try and figure out what you are talking about.
>
> I found another reference that describes running MakePy from the PythonWin
> menu.  I tried that and it created a big file in the
> win32com\gen_py folder
> under a name that looks like it's probably Excel's GUID.  I
> gather that when
> you try to create an Excel application with Dispatch, it somehow
> finds that
> file and imports it.
>
> After running MakePy, the SetColors function did work!  That's
> pretty slick.
> It must be doing a lot of stuff behind the scenes.  Do you know if MakePy
> does early binding?  Do you know what the performance difference
> is (good or
> bad)?  Not that it matters.  I'd rather have clean code than high
> performing
> code.  I'll replace my Macro kludge with SetColors. I'd like to
> know what's
> going on though.
>

I can only point you in the usual directions for more info.  See the
PythonWin Help stuff (Help | Pythonwin reference), in particular the Quick
start to Python COM, and of course Mark's book "Python Programming on
Win32".

Graham



More information about the Python-win32 mailing list