NPOI导出 The maximum column width for an individual cell is 255 characters

增加如下代码

if (arrColWidth[column.Ordinal] > 255)
{
    arrColWidth[column.Ordinal] = 255;
}
//设置列宽
sheet.SetColumnWidth(column.Ordinal, (arrColWidth[column.Ordinal] + 1) * 256);

 

posted @ 2019-07-02 10:44  zhaogaojian  阅读(1475)  评论(0编辑  收藏  举报