Save Word DOCX (Clustered Bar Chart with all zeroes in Axis) to HTML Stream using C# .NET | Avoid Divide By Zero Exception

Aspose.Words throws a DivideByZero exception when trying to save to html stream OR when trying do use UpdatePageLayout on a word document containing a chart with all zeroes in axis. We are using Aspose.Words 19.7

This is the sample code:

Document doc = new Document(@"C:\Tests\FirstSample3.docx");
var xhtmlDocumentStream = new MemoryStream();
doc.Save(xhtmlDocumentStream, new Aspose.Words.Saving.HtmlSaveOptions { ImagesFolder = @"C:\Tests"});
//doc.UpdatePageLayout();

Chart.zip (18.4 KB)

@adrian.anton,

We have logged this problem in our issue tracking system with ID WORDSNET-21030. We will further look into the details of this problem and will keep you updated on the status of correction. Sorry for the inconvenience.

The issues you have found earlier (filed as WORDSNET-21030) have been fixed in this Aspose.Words for .NET 20.10 update and this Aspose.Words for Java 20.10 update.