<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm driving Excel from python, largely successfully. Now I'm trying to > add errorbars to XY scatter plots. Keep getting a com_error. Can't > track down the problem. > > I modified a simple example to duplicate the problem. Thanks to Mathieu > Fenniak http://www.stompstompstomp.com/weblog/entries/67/ for the code. > > The traceback is shown below. You can see that the Excel chart series > has a method called ErrorBar. But when I try to use it with any or all > of its allowed arguments, it fails. The traceback goes into the guts of > win32com but I don't really have a clue at that point. (Happy to learn > something new though). > > The relevant Excel VBA language doc is here. > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaxl11/html/xlmthErrorBar1_HV03076818.asp > > Hope someone can help. Losing hair .... fast! > > > > In [16]: %run test.py > --Return-- >> c:\python23\lib\pdb.py(992)set_trace()->None > -> Pdb().set_trace() > (Pdb) c > There's a method waiting > --------------------------------------------------------------------------- > pywintypes.com_error Traceback (most > recent call > last) > > c:\temp\mpival\test.py > 79 > 80 # A simple example: > ---> 81 plot( (1,2,3,4,5), (6,7,8,9,10) ) > 82 > 83 # Some more data: > > c:\temp\mpival\test.py in plot(x, y, xAxisLog, yAxisLog) > 35 if series.ErrorBar: > 36 print "There's a method waiting" > ---> 37 series.ErrorBar(Direction = constants.xlY)
According to the docs, the Include and Type arguments are required, and they're not being passed to the method. hth Roger ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =---- -- http://mail.python.org/mailman/listinfo/python-list