makepy.py excel - create diagram
Verfasst: Mittwoch 19. Juli 2006, 15:09
Ich habe eine 'Microsoft Excel 11.0 Object Library' aus dem 'EXCEL.EXE'-File erstellt und kann jetzt Excel-Diagramme aus python generieren. Aber wenn ich spezielle Variablen, wie z.B. die 'MajorGridlines" benutze, bekomme ich eine Fehlermeldung.
####### VB-Example
ActiveChart.Axes(xlValue).MajorGridlines.Select
With Selection.Border
.Weight = xlHairline
End With
End Sub
#######
####### Python-Example
c = excel.ActiveChart
c.Axes(excelcom.constants.xlValue).MajorGridlines.Weight = excelcom.constants.xlHairline
#######
Ich bekomme folgenden Fehler: [color=red] AttributeError: '<win32com.gen_py.Microsoft Excel 11.0 Object Library.Gridlines instance at 0x21599600>' object has no attribute 'Weight' [/color]
Wieso kann ich die 'MajorGridlines' nicht manipulieren? Kann es sein, dass mir in meiner Library was fehlt. Wenn ja, was kann ich außer EXCEL.EXE noch heranziehen?
####### VB-Example
ActiveChart.Axes(xlValue).MajorGridlines.Select
With Selection.Border
.Weight = xlHairline
End With
End Sub
#######
####### Python-Example
c = excel.ActiveChart
c.Axes(excelcom.constants.xlValue).MajorGridlines.Weight = excelcom.constants.xlHairline
#######
Ich bekomme folgenden Fehler: [color=red] AttributeError: '<win32com.gen_py.Microsoft Excel 11.0 Object Library.Gridlines instance at 0x21599600>' object has no attribute 'Weight' [/color]
Wieso kann ich die 'MajorGridlines' nicht manipulieren? Kann es sein, dass mir in meiner Library was fehlt. Wenn ja, was kann ich außer EXCEL.EXE noch heranziehen?