EDN Admin
Well-known member
Im creating an Excel chart in c# and im getting an invalid parameter error, when I try to set the 4th series xvalues. It seems that the 4 series is not being made by the setSourceData method. Is there a limit to the amount of series that can be made by
the setSourceData method? Im lost on what the problem could be.
<div style="color:black; background-color:white
<pre>Excel.Range rg1 = oSheet.get_Range(<span style="color:#a31515 "E2:E131, F2:F131, G2:G131, I2:I131", Missing.Value);
oChart.SetSourceData(rg1, Missing.Value);
oChart.SeriesCollection(1).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131");
oChart.SeriesCollection(2).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131");
oChart.SeriesCollection(3).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131");
oChart.SeriesCollection(4).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131"); <span style="color:green //Invalid parameter ERROR HERE
[/code]
<br/>
<br/>
<br/>
Thanks<br/>
<br/>
<br/>
View the full article
the setSourceData method? Im lost on what the problem could be.
<div style="color:black; background-color:white
<pre>Excel.Range rg1 = oSheet.get_Range(<span style="color:#a31515 "E2:E131, F2:F131, G2:G131, I2:I131", Missing.Value);
oChart.SetSourceData(rg1, Missing.Value);
oChart.SeriesCollection(1).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131");
oChart.SeriesCollection(2).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131");
oChart.SeriesCollection(3).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131");
oChart.SeriesCollection(4).XValues = oSheet.get_Range(<span style="color:#a31515 "A2:A131"); <span style="color:green //Invalid parameter ERROR HERE
[/code]
<br/>
<br/>
<br/>
Thanks<br/>
<br/>
<br/>
View the full article