When calling chart.Calculate() on a chart that has an axis label with a value greater than int.MaxValueand is displaying Data Labels, the calculation will throw a System.OverflowException : Value was either too large or too small for an Int32.
Repro code:
var format = FileFormatUtil.DetectFileFormat("ChartWithLongNumber.xlsx");
var asposeLoadOptions = new LoadOptions(format.LoadFormat)
{
LoadFilter = new LoadFilter(LoadDataFilterOptions.All)
};
using (var workbook = new Workbook("ChartWithLongNumber.xlsx", asposeLoadOptions))
{
foreach (var worksheet in workbook.Worksheets)
{
foreach (var chart in worksheet.Charts)
{
chart.Calculate();
}
}
}
@bvk,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.
This issue has been logged as
CELLSNET-46842 - Calculating charts on an excel cause error
Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.
The issues you have found earlier (filed as CELLSNET-46842) have been fixed in Aspose.Cells for .NET v19.8. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi