excel centering columns

Lance Hoffmeyer lance at augustmail.com
Wed May 17 21:39:52 EDT 2006


I did read the error message.  I did not understand why 'constant' was
not defined.  In perl I did not have to run anything like 'makepy' to
get constants to work.  And no, I don't want to go back to perl.  Python
appears to integrate with packages more readily than perl does.

I was unaware of 'makepy' until you mentioned it.  Spent 3 hours searching
the web and google groups under python excel column | 'centering columns' to
find a solution.  Never saw anything mentioned about 'makepy'.

Thanks.  I will do some searches on 'makepy'.

Lance






John Machin wrote:
>> from win32com.client import constants
>> sh2.Columns(lastcol).HorizontalAlignment = constant.xlCenter
>> NameError: name 'constant' is not defined
> 
> 1. So why not try reading the error message and fixing the problem
> instead of thrashing about madly?
> 
> 2. You have run makepy on your Excel library, haven't you?
> 



More information about the Python-list mailing list