Row height must be between 0 and 409

Aspose.Cells_8.5.2


Workbook workbook = new Workbook(@“C:\Example.xlsx”);
Worksheet worksheet = workbook.Worksheets.First();
Cell cell = worksheet.Cells[1,4];

//why is this height 600? it doesn’t look that tall in Excel
int cellHeight = cell.GetHeightOfValue();

//throws error “Row height must be between 0 and 409.”
//only throws error when running in an IIS application, but not on my local machine
//why is this?
worksheet.Cells.SetRowHeightPixel(cell.Row, cellHeight);

Hi Chris,


Thank you for contacting Aspose support.

I have evaluated the presented scenario while using the latest revision of Aspose.Cells for .NET 8.7.0.4 (attached) and I am getting correct value for GetHeightOfValue method, that is; 27. It appears that your current version of the API has some anomaly for this scenario.

Regarding your other concerns, it is the limitation of Excel application that it does not allow you to set the row height larger than 409. Please check the attached snapshot and confirm it on your end by setting the row height to 410. Excel will pop-up an error dialog stating that value is expected between 0 & 409. As Aspose.Cells APIs follow Excel’s guidelines and specifications so you cannot set the row height larger than 409.