I am trying to create a chart containing error bars. This works for Excel 2010 and above but when loading the xls format file I get the error "File error: data may have been lost.". After loading the chart is displayed correctly.
- Code: Select all
var s4 = chart.Series.Add();
s4.Values = sheet.Range["U3:U4"];
s4.CategoryLabels = sheet.Range["R3:R4"];
var eb = s4.ErrorBar(true, sheet.Range["V3:V4"], sheet.Range["W3:W4"]);
eb.Border.Weight = ChartLineWeightType.Medium;
eb.Border.Color = Color.Gray;
If I change to bIsY parameter to false I do not get the error message.