Hi all,
After flattening labels on a XLSX with a Waterfall chart and saving it once, Aspose throws an exception when trying to open the file again. In addition, it appears as though the Waterfall chart itself stops rendering in the Excel after the initial save (maybe the chart is being corrupted?).
I have attached a sample file and provided some reproduction code below. Thanks!
var format = FileFormatUtil.DetectFileFormat("BrokenWaterfallChart.xlsx");
var asposeLoadOptions = new LoadOptions(format.LoadFormat)
{
LoadFilter = new LoadFilter(LoadDataFilterOptions.All)
};
using (var workbook = new Workbook("BrokenWaterfallChart.xlsx", asposeLoadOptions))
{
foreach (var workbookWorksheet in workbook.Worksheets)
{
foreach (var chart in workbookWorksheet.Charts)
{
chart.Calculate();
foreach (var nSeries in chart.NSeries)
{
nSeries.Name = nSeries.DisplayName;
}
}
}
workbook.Save("BrokenWaterfallChart.xlsx");
}
// Throws Aspose exception
using (var workbook = new Workbook("BrokenWaterfallChart.xlsx", asposeLoadOptions))
{
}
BrokenWaterfallChart.zip (10.3 KB)