瀏覽代碼

导出列宽BUG修改

章政 6 年之前
父節點
當前提交
1ad3d1dac2
共有 1 個文件被更改,包括 2 次插入 和 0 次删除
  1. 2 0
      UAS-出货标签管理(泽天)/PublicMethod/ExcelHandler.cs

+ 2 - 0
UAS-出货标签管理(泽天)/PublicMethod/ExcelHandler.cs

@@ -76,6 +76,8 @@ namespace UAS_LabelMachine
                     dataLength = DataTable.Rows[0][i].ToString().Length;
                     dataLength = dataLength * 500;
                 }
+                if (dataLength > 100000)
+                    dataLength = 10000;
                 sheet.SetColumnWidth(i, dataLength);
             }
             ICellStyle style = book.CreateCellStyle();