Cannot convert workbook with pivot tables if HiddenColDisplayType or HiddenRowDisplayType is set to Remove

Hi!

There seems to be an issue with exporting pivot tables to html. An ArgumentOutOfRangeException is thrown when trying to convert any of the Excel files from the archive attached using the following code:

var input = ...;
var output = ...;

AsposeLicenser.LoadLicense();

var options = new HtmlSaveOptions
{
    ExportImagesAsBase64 = true,
    ExportSingleTab = true,
    ExportHiddenWorksheet = false,
    HiddenRowDisplayType = HtmlHiddenRowDisplayType.Remove,
    HiddenColDisplayType = HtmlHiddenColDisplayType.Remove,
    ExportGridLines = true
};

using (var wb = new Workbook(input))
    wb.Save(output, options);

Note that if I don’t set the HiddenColDisplayType or set it to Hidden, no exception is thrown.

pivot.zip (22.8 KB)

We are using Aspose.Cells for .Net 20.7.0.

Edit: Found some other files. For these I’m getting NullReferenceExceptions. This time it seems to be triggered by the HiddenRowDisplayType being set to Remove.

pivot2.zip (31.0 KB)

Thanks,
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-47493 - Problem converting xlsx to html

@arnoldbeilandevozon,

This is to inform you that we have fixed your issue “CELLSNET-47493” now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@arnoldbeilandevozon,

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

Your issue should be fixed in it.

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

Seems to work now. Please include it in your next release on nuget.org as well.

Thanks,
Arnold

@arnoldbeilandevozon,
Sure, it will be done in the next release and thank you for the feedback.

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