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

Free Support Forum - aspose.com

Calling NSeries.Clear() on Surface charts corrupts the Excel file

Hi,

After some investigation I discovered that calling Nseries.Clear() on an Excel file with Surface charts will corrupt the file.

Repro code:

var fileName = "SurfaceChart.xlsx";

using (var workbook = new Workbook(fileName))
{
	foreach (var worksheet in workbook.Worksheets)
	{
		foreach (var chart in worksheet.Charts)
		{
			chart.NSeries.Clear();
		}
	}

	workbook.Save(fileName);
}

After this save Aspose will still able to open and save the file, however, attempting to open it in Excel will crash the program.

SurfaceChart.zip (9.4 KB)

@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-46665 - Excel file is corrupted after calling NSeries.Clear() on Surface charts

@bvk,

Please try our latest version/fix: Aspose.Cells for .NET v19.3.4 (attached)

We have fixed your issue (logged earlier as “CELLSNET-46665”) now.

Let us know your feedback.

Aspose.Cells19.3.4 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.3.4 For .Net4.0.Zip (4.9 MB)

@bvk,

Please try our latest version/fix: Aspose.Cells for .NET v19.3.6 (attached)
We have made more enhancements to the fix and you should try it to sort out your issue.
Let us know your feedback.
Aspose.Cells19.3.6 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.3.6 For .Net4.0.Zip (4.9 MB)

@Amjad_Sahi, @ahsaniqbalsidiqui

Sorry for the late reply, I’ve been rather swamped lately.

Thank you for the update, I can confirm 19.3.6 works perfectly for our use case here :slight_smile:

@bvk,

Good to know that your issue is sorted out by latest version/fix. 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.