Re: [python-win32] Excel win32com
magnus at thinkware.se
Mon May 3 18:33:24 EDT 2004
> I'm looking for the method to retrive the cell format for a given cell.
> I found it, but then I lost it.
This is part of the Excel object model. The most convenient way to learn that
might be the MS Excel VBA help texts and to use the object browser in the
Visual Basic Editor. I can also recommend Steven Roman's "Writing Excel
Macros with VBA", from O'Reilly.
> Also, on a different note, I'm a bit new to all this, so why do I have
> to run the makepy file before I can use the methods for the win32com
> app? Or did that make any sense? Sorry, haven't slept recently.
Go to sleep Stryder, that usually improves the code. ;)
You don't *have* to run makepy. I very rarely do... As I'm
mentioning O'Reilly books, I can only advice you to get Mark
Hammond's and Andy Robinson's "Python Programming on Win32".
(By the way, what happened with a 2nd edition of that?)
By using MakePy, you will enable early binding for COM objects.
This gives you three advantages:
- Faster interfacing with the COM object (the Python win32com
code doesn't have to locate your object in runtime).
- Constants defined by the type library become available.
- There is better support for advanced parameter passing.
There are also disadvantages:
- It's extra work...
- The generated file is rather big.
- You need to handle case sensitivity issues.
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus at thinkware.se
More information about the Python-win32