Free Support Forum - aspose.com

Getting ArgumentOutOfRangeException with Worksheet.AutofitRows()

Hi,

I'm getting an ArgumentOutOfRangeException when I call Worksheet.AutofitRows(). The context is that I'd just inserted several rows of data into the worksheet, some of which have wrapped cells. Before I spend a couple hours factoring this down to something worth sending to you, I'm hoping you can tell me if this is a known problem.

Here's a relevant stack trace:

mscorlib.dll!System.Collections.ArrayList.this[int].get(int index) + 0x76 bytes
Aspose.Cells.dll!Aspose.Cells.Cell.ಧ(Aspose.Cells.Style ನ = {Aspose.Cells.Style}) + 0x227 bytes
Aspose.Cells.dll!Aspose.Cells.Cell.ಧ() + 0x36 bytes
Aspose.Cells.dll!Aspose.Cells.Cell.StringValue.get() + 0x4f bytes
Aspose.Cells.dll!Aspose.Cells.ᙑ.ᙘ(System.Drawing.Graphics Ԃ = {System.Drawing.Graphics}, Aspose.Cells.Cells ୌ = {Aspose.Cells.Cells}, int ਒ = 0, int ਔ = 1048575, int ਗ = 0, int ਙ = 16383) + 0x1f2 bytes
Aspose.Cells.dll!Aspose.Cells.ᙑ.ᙒ(Aspose.Cells.Cells ୌ = {Aspose.Cells.Cells}, int ਒ = 0, int ਔ = 1048575, int ਗ = 0, int ਙ = 16383) + 0x4f bytes
Aspose.Cells.dll!Aspose.Cells.Worksheet.AutoFitRows() + 0x2b bytes

Thanks.

It seems an problem in old versions. Please try this attached version.