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