HeinrichMREx
New Member
- Joined
- Dec 9, 2012
- Messages
- 7
Hallo there,
why the following line in C#
throws the following exception
What is the correct call in C# to get the series of a chart ?
If I try this way:
I get the following compile error :
Best,
why the following line in C#
Code:
Excel.Series mySeries = (Excel.Series)myChart.SeriesCollection(1);
Code:
Exception Type: System.InvalidCastException
If I try this way:
Code:
Excel.Series mySeries = (Excel.Series)myChart.SeriesCollection.Item(1);
Code:
error CS0119: 'Microsoft.Office.Interop.PowerPoint.Chart.SeriesCollection(object)'
is a 'method', which is not valid in the given context