setting multiple columns text in the legend

Nov 18, 2011 at 5:49 AM

Hi,

I am generating a excel chart.Single column values are displayed correctly in the legend section of the chart.

But i want to display mulitple column values of row  in the legend.

Code for single column is

 var ser2 = chart.Series.Add(range.Offset(1, 6, 1, 3), range.Offset(-1, 6, 1, 3));
  ser2.HeaderAddress = range.Offset(1, 0, 1, 1);

But i want ser2.HeaderAddress property to accept a range

 var ser2 = chart.Series.Add(range.Offset(1, 6, 1, 3), range.Offset(-1, 6, 1, 3));
  ser2.HeaderAddress = range.Offset(1, 0, 1,3); (not working)

Any help is appreciated

 

Thanks

Giridhar

 

 

Coordinator
Nov 18, 2011 at 1:28 PM

Hmm, I have restricted the HeaderAddress to only allow single cells, but Excel allows rows and columns as well. I'll see if I can change it to the next check-in.

If you need a quick fix, try to remove the check at the top of the HeaderAddress property.

Jan