python win32com excel problem

Bart Willems b.r.willems at gmail.com
Tue May 1 20:17:14 EDT 2007


Bart Willems wrote:
> Autofit is a method. Also, columns are a method of a worksheet - try:
> xlApp.Worksheets.Columns("C:K").Autofit()

Silly me. That is of course xlApp.Activesheet.Columns("C:K").Autofit()

On a sidenote, you can refer to a worksheet with xlApp.Worksheets(Name) 
as well.



More information about the Python-list mailing list