GetViewInfo throws an error for certain Excel file in .NET

Calling GetViewInfo for a certain Excel file leads to this error:

Height cannot be lesser than 1 or greater than UInt16.MaxValue
Parameter name: height
Actual value was 72369.

The error was reproduced with GroupDocs.Viewer 24.6 and the following code:

            using (var viewer = new Viewer(documentPath))
            {
                var htmlViewOpts = HtmlViewOptions.ForEmbeddedResources();
                var viewOptions = ViewInfoOptions.FromHtmlViewOptions(htmlViewOpts);
                viewOptions.SpreadsheetOptions = SpreadsheetOptions.ForOnePagePerSheet();
                var info = viewer.GetViewInfo(viewOptions);
            }

The conversion (calling viewer.View) works actually fine, it’s just viewer.GetViewInfo which throws this error.
Can you please take a look?

Hello Clemens,

The reported issue is a bug - we have reproduced it, found its reason and already fixed it. This fix will be a part of the GroupDocs.Viewer for .NET v24.7, which will be released in the next few days.

Sorry for the inconvenience and thanks for reporting!

With best regards,
Denis

1 Like

@denisgvardionov

Hi Denis,

That was lightning fast :+1:
Thanks a lot for the fix! I’ll test it with the next version :slight_smile:

Best regards,
Clemens

Hi Clemens,

The GroupDocs.Viewer for .NEt ver. 24.7 was finally released. It contains the fix of the discussed bug. The package is available at:

Have a nice day!

1 Like

@denisgvardionov

Hi Denis,

Thank you for the notification and again for the fix :slight_smile:
I can confirm that the bug is resoled.

Best regards,
Clemens

Hi Clemens,

You’re welcome!