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.Default.GetBytes(currentCell.ToString()).Length;
currentRow.HeightInPoints = 20 * (length1 / 60 + 1);
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/238281.html
標籤:ASP.NET
