Title: makepy.py excel-libs
Looking at your VBA code, it seems like Weight is a property of Border, not of MajorGridlines.
 
You may want to try MajorGridlines.Border.Weight = ...
 
best regards,
g



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Wolf, Matthias ALRT/ELD
Sent: donderdag 20 juli 2006 9:44
To: python-win32@python.org
Subject: [python-win32] makepy.py excel-libs

Hello

I've made a 'Microsoft Excel 11.0 Object Library' from the 'EXCEL.EXE'-File and can now create excel-diagrams with python.

But if want to use some special variables e.g. 'MajorGridlines':


####### VBA-Marco-Example
    ActiveChart.Axes(xlValue).MajorGridlines.Select
    With Selection.Border
        .ColorIndex = 57
        .Weight = xlHairline 
        .LineStyle = xlDot
    End With
End Sub
#######

####### Python-Example
c = excel.ActiveChart
c.Axes(excelcom.constants.xlValue).MajorGridlines.Weight = excelcom.constants.xlHairline
#######

I get the following error: AttributeError: '<win32com.gen_py.Microsoft Excel 11.0 Object Library.Gridlines instance at 0x21599600>' object has no attribute 'Weight'

Why can I not manipulate this 'MajorGridlines'? Is there anything missing in my Library. If yes, which library i have to use?


Thanks in advanced!

Kind regards, Wolf

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to