osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AttributeError: '<win32com.gen_py.Microsoft Excel 14.0 Object Library.Shape instance at 0x70837752>' object has no attribute 'SeriesCollection'


On Thursday, 13 February 2014 16:41:48 UTC+5:30, Ben Finney  wrote:
> Jaydeep Patil <patil.jay2009 at gmail.com> writes:
> 
> 
> 
> > I have created chart object. But unable to add series into chart.
> 
> 
> 
> Your code isn't self-contained (we are not able to run it as you
> 
> presented it).
> 
> 
> 
> Are you relying on some specific third-party library? If so, you need to
> 
> be explicit. You may also get better response if you ask for help on the
> 
> specific discussion forums for that library.
> 
> 
> 
> -- 
> 
>  \       "My classmates would copulate with anything that moved, but I |
> 
>   `\               never saw any reason to limit myself." --Emo Philips |
> 
> _o__)                                                                  |
> 
> Ben Finney

Hi...
Just consider that you have chart object & you need to add data series for that chart. How you can add this?

Let me know.

I try to add data series using below command. But it gives error.

Command:
chartObj.SeriesCollection().NewSeries() 


Error:
Traceback (most recent call last):
  File "<pyshell#16>", line 1, in <module>
    chartObj.SeriesCollection().NewSeries()
  File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 465, in __getattr__
    raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), attr))
AttributeError: '<win32com.gen_py.Microsoft Excel 14.0 Object Library.Shape instance at 0x70837752>' object has no attribute 'SeriesCollection'
>>> se = chartObj.SeriesCollection().NewSeries() 


Regards
Jay