Python, COM and Excel

Mark Hammond mhammond at
Mon Nov 15 17:15:04 EST 1999

charliehubbard76 at wrote in message <80ps42$kkk$1 at>...
>I'm trying to write a python script to take an excel
>workbook and turn it into html pages.  I'm trying to
>automate this process, but I can't seem to get the
>bounds of the selection through com.  I can get the
>contents of a selection with
>app = Dispatch(Excel.Application)
>But this just gives me the data contained with the cells.

Yes.  "app.Selection" is a range object.  Making a "call" on this object
returns the data in the range (ie, the "Value" property on the range object)

>>> app.Selection.Address

>I want to be able to check fonts, bold, and format
>information of each cell to get it as close to the excel
>formatting as possible.  In order to do this I need to

>>> app.Selection.Font.Name



More information about the Python-list mailing list