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


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 = ...;


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. (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. (31.0 KB)


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


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.


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 as well.


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