Please see few issues in handling the attached file
trend_eq_issue.zip (12.8 KB)
by code:
var wb = new Workbook(GetFullPath("trend_eq_issue.xlsx"));
var sheet = wb.Worksheets[0];
sheet.Cells.ImportArray(new[] {1, 1, 1}, 1, 1, true);
foreach (var pt in sheet.PivotTables)
{
pt.RefreshData();
pt.CalculateData();
}
foreach (var chart in sheet.Charts)
{
if (chart.PivotSource == null)
{
chart.Calculate();
}
else
{
chart.RefreshPivotData();
chart.Calculate();
}
}
wb.Save(GetFullPath("result.xlsx"), SaveFormat.Xlsx);
wb.Save(GetFullPath("result.pdf"), SaveFormat.Pdf);
- The produced PDF has the trend equation as
y=E+00x + 1
while in Excel it would bey=1
, R is incorrect as well. -
chart.Calculate()
breaks the Scatter Chart (see the screenshot): incorrect legend, the trend equation label is incorrect and does not reflect changes in data and trend (both charts are affected).
image.png (3.1 KB)
The issue is observed with Aspose.Cells 17.8.0.