浏览代码

修改导出execl的行高和列宽

CXS 3 年之前
父节点
当前提交
1de9065c5d
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

+ 3 - 1
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -1830,13 +1830,14 @@ namespace OTSIncAReportGrids
 
                 //设置颗粒名列宽
                 sheet.SetColumnWidth(1, 30 * 256);//夹杂物名列宽
-                sheet.SetColumnWidth(2, 3 * 256);//图像列宽
+                sheet.SetColumnWidth(2, 7 * 256);//图像列宽
 
                 IRow row;
                 ICell cell;
 
                 //插入表头
                 row = sheet.CreateRow(1);//从第15行添加一行
+                row.Height = 30 * 20;
                 for (int i_cell = 0; i_cell < dgV_ParticlesDevidePage.Columns.Count; i_cell++)
                 {
                     cell = row.CreateCell(i_cell);
@@ -1850,6 +1851,7 @@ namespace OTSIncAReportGrids
                 for (int i_row = 0; i_row < dgV_ParticlesDevidePage.Rows.Count; i_row++)
                 {
                     row = sheet.CreateRow(2 + i_row);
+                    row.Height = 45 * 20;
                     for (int i_cell = 0; i_cell < dgV_ParticlesDevidePage.Columns.Count; i_cell++)
                     {
                         cell = row.CreateCell(i_cell);