[python-win32] makepy.py excel-libs
guy lateur
guy.lateur at telenet.be
Thu Jul 20 10:03:12 CEST 2006
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: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org] On Behalf Of Wolf, Matthias
ALRT/ELD
Sent: donderdag 20 juli 2006 9:44
To: python-win32 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20060720/72f334aa/attachment.html
More information about the Python-win32
mailing list