Free Support Forum -

Null reference exception when converting certain XLSM to HTML in .NET

Converting the attached XLSM to HTML with GroupDocs Viewer 21.5 results in a ‘null reference’ exception:

‘Object reference not set to an instance of an object.’ (110.4 KB)

The exception occurred when using this conversion options:

var options = HtmlViewOptions.ForEmbeddedResources(@"D:\output\output_viewer{0}.html");
options.SpreadsheetOptions = GroupDocs.Viewer.Options.SpreadsheetOptions.ForOnePagePerSheet();
options.SpreadsheetOptions.RenderGridLines = true;
options.SpreadsheetOptions.RenderHeadings = true;


We’ve reproduced this issue and logged it in our internal but tracker. The issue ID is VIEWERNET-3316. We’ll update you when this issue will be fixed.

1 Like


GroupDocs.Viewer for .NET v21.6 that includes fix for this issue has been published. You can find the new version at

Have a nice day!