Aspose exception thrown on call to Excel.Save(Stream- FileFormatType) when there are 65535 rows

Using Aspose.Cells 3.8.1.13, when I programmatically create an Excel document with 65536 rows of data (and a few columns), a runtime exception is thrown by Excel.Save(Stream, FileFormatType).

[Message]: Specified argument was out of the range of valid values. [Stack Trace]: at Aspose.Cells.Cells.GetRowHeight(Int32 row) at Aspose.Cells.Record. .$ (Comment xa, Worksheet ´, Int32 ß) at Aspose.Cells.Record. .% (Worksheet ´, Int32 & , Int32 µ, Int32 , Int32 ' , Int32 ( ) at Aspose.Cells.Worksheet.ª(~ ) at Aspose.Cells.Worksheets.¦(~ ) at Aspose.Cells.Worksheets.«(FileFormatType ©) at Aspose.Cells.Worksheets.ª(Stream , FileFormatType ©) at Aspose.Cells.Excel.Save(Stream stream, FileFormatType fileFormatType) at ...

When I tried 65531 rows, no exception was thrown.

This does not appear to be an off-by-1 error, since an exception was thrown for 65535 rows.

The problem can be reproduced by reading the file into an Aspose Excel object and the saving the file to a memory stream. I can provide files under NDA, if you have any trouble reproducing this.

Thanks for your report. Please try this attached fix.

I’m not sure when I can test this, given that 3.9 requires a search-and-replace on the Excel type name. Hopefully within the week.

3.9.0.1 fixes the problem that I identified. Thank you!