We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Get Excel Series Labels Data Point value in .NET

I am trying to change the series data label based on its value. I need to get Excel series labels data point value in .NET code. The following code works but I can’t find what the value is for each point. How do you find the value of each point in the series?

Dim pointCount As Integer = series.Points.Count
Dim i As Integer = 0
Do While (i < pointCount)
 Dim pointIndex As ChartPoint = series.Points(i)
 pointIndex.DataLabels.Text = "Series 1 Point " + i.ToString
 i = (i + 1)
Loop

@jlserpe,

Does ChartPoint.DataLabels.Text attribute not work to get value of the data point label? Could you please provide your Excel file containing the chart which you are using in your code. Also, you may try to call Chart.Calculate() before using the suggested attribute if it works.

chart.Calculate();
Console.WriteLine(chart.NSeries[0].Points[0].YValue);

PS. if you need to post the file(s), please zip the file prior attaching here.