win32com.client / Trendlines

mathieu mathieu.malaterre at
Wed Jan 28 16:21:05 CET 2009

Hi there,

  I am trying to use win32com.client, but I do not think I fully grasp
the concept. So far I copied chunk of code from the net to write my
script. It worked well until I could not find any example on
Trendlines. According to doc it should be as simple as:

wc.Chart.SeriesCollection(1).Trendlines.Add( type=constants.xlLinear,
name="Linear Trend")

But I get an error:

Traceback (most recent call last):
  File "", line 65, in ?
( type=constants.xlLinear, name="Linear Trend")
AttributeError: 'function' object has no attribute 'Add'

It looks like Trendlines indeed does not have such member function. Am
I missing something, do I need to generate something particular (eg.

Thanks !

More information about the Python-list mailing list