优化iqc导出报错:The maximum column width for an individual cellis 255 characters.
已修改1个文件
3 ■■■■ 文件已修改
WebApi/Gs.Toolbox/ExcelHelper.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebApi/Gs.Toolbox/ExcelHelper.cs
@@ -222,8 +222,7 @@
            headerRow.CreateCell(column.Ordinal)
                .SetCellValue(column.ColumnName);
            headerRow.GetCell(column.Ordinal).CellStyle = headStyle;
            sheet.SetColumnWidth(column.Ordinal,
                (arrColWidth[column.Ordinal] + 6) * 256);
           // sheet.SetColumnWidth(column.Ordinal,(arrColWidth[column.Ordinal] + 6) * 256);
        }
        //sheet.SetAutoFilter(new CellRangeAddress(0, 0, 0, dtSource.Columns.Count - 1)); //首行筛选