Xlsx to Html conversion issues with charts and zero-width unicode characters

Hi!

I’m converting xlsx files to html using Aspose.Cells 20.7.0. I have a requirement to support special unicode characters inside the cells. When running the following code, with the archive attached below, I get an exception: “System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+”.

charts.zip (13.4 KB)

var input = @"...\charts.xlsx";
var output = @"...";

AsposeLicenser.LoadLicense();

var specialCharacter = '\x200D'; //zero-width joiner
    // the exception does not come for other zero-width characters, e.g. \x200C

var sequence = new string(specialCharacter, 200);
    // if this would have length 100, the exception would not come

using (var wb = new Workbook(input))
{
    var cell = wb.Worksheets[0].Cells[0, 1];
    Assert.AreEqual("ValueX", cell.Value);

    cell.Value = sequence + "test" + sequence;

    wb.Save(output, new HtmlSaveOptions
    {
        ExportImagesAsBase64 = true
            // if this would be false, the exception would not come
    });
}

As explained by the comments, I only get the exception in specific cases.

As a workaround, I tried using it with “ExportImagesAsBase64” set to false, while doing the image inlining myself. However, “test” does not show up on the chart legend of the first chart and the second chart goes missing if the length of the sequence is longer than a certain limit:

var input = @"...\charts.xlsx";
var output = @"...";

AsposeLicenser.LoadLicense();

var specialCharacter = '\x200D'; //zero-width joiner

var sequence = new string(specialCharacter, 300);
    // works fine if the length is 100 instead of 300
   // if length is 200, "test" shows up on the first chart, but the second still chart goes missing

using (var wb = new Workbook(input))
{
    var cell = wb.Worksheets[0].Cells[0, 1];
    Assert.AreEqual("ValueX", cell.Value);

    cell.Value = sequence + "test" + sequence;

    wb.Save(output, new HtmlSaveOptions { ExportImagesAsBase64 = false });
}

I know my use case is pretty specific, but in both cases the differences in behaviour induced by small changes are unexpected.

Thanks for any help!
Arnold

@arnoldbeilandevozon,
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-47484 - Xlsx to Html conversion issues with charts and zero-width unicode characters

@arnoldbeilandevozon,

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

Your issue should be fixed in it. For “test” does not show up on the chart legend of the first chart, this is same as the output by MS Excel.

Let us know your feedback.
Aspose.Cells20.7.6 For .Net2_AuthenticodeSigned.Zip (5.4 MB)
Aspose.Cells20.7.6 For .Net4.0.Zip (5.4 MB)

Works fine, thanks.

@arnoldbeilandevozon,

Thanks for your feedback.
Good to know that your issue is sorted out by the new fix.

The issues you have found earlier (filed as CELLSNET-47484) have been fixed in Aspose.Cells for .NET v20.8. This message was posted using Bugs notification tool by Amjad_Sahi