for (int i=0; I <=columnCount; I++)
{
Sheet. AutoSizeColumn (I);
}
For (int rowNum=2; RowNum <=sheet. LastRowNum; RowNum++)
{
IRow currentRow=sheet. GetRow (rowNum);
ICell currentCell=currentRow. GetCell (columnCount);
Int length1=Encoding. The Default. GetBytes (currentCell. The ToString ()). The Length;
. CurrentRow HeightInPoints=20 * (length1/60 + 1);
}