C# : MS Chart : SeriesCollection -> InvalidCastException?
Posted
by
HeinrichStack
on Stack Overflow
See other posts from Stack Overflow
or by HeinrichStack
Published on 2012-12-11T22:03:47Z
Indexed on
2012/12/11
23:03 UTC
Read the original article
Hit count: 290
What is the correct way to get the Series of a char in PPT 2010.
I tried
PowerPoint.SeriesCollection mySeriesCollection = (PowerPoint.SeriesCollection)
myChart.SeriesCollection(1);
throws the following exception
Exception Type: System.InvalidCastException
Further, What is the correct call in C# to get the series of a chart ?
If I try this way:
PowerPoint.Series mySeries = (PowerPoint.Series)myChart.SeriesCollection.Item(1);
I get the following compile error :
error CS0119: 'Microsoft.Office.Interop.PowerPoint.Chart.SeriesCollection(object)'
is a 'method', which is not valid in the given context
© Stack Overflow or respective owner