mengjie 5 年 前
コミット
c41cc4d70c
共有1 個のファイルを変更した8 個の追加4 個の削除を含む
  1. 8 4
      codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

+ 8 - 4
codegit/CallCenterCommon/CallCenter.Utility/NPOI/NPOIHelper.cs

393
                     headerfont.FontHeightInPoints = 12;
393
                     headerfont.FontHeightInPoints = 12;
394
                     HeadercellStyle.SetFont(headerfont);
394
                     HeadercellStyle.SetFont(headerfont);
395
 
395
 
396
-
397
-                    //用column name 作为列名
398
-                    int icolIndex = 0;
399
-                    IRow headerRow = sheet.CreateRow(0);
396
+                //第一行为标题
397
+                IRow headRow = sheet.CreateRow(0);
398
+                ICell cellh = headRow.CreateCell(0);
399
+                cellh.SetCellValue(Name );
400
+
401
+                //用column name 作为列名
402
+                int icolIndex = 0;
403
+                    IRow headerRow = sheet.CreateRow(1);
400
                     if (cols == null || (cols != null && cols.Length == 0))
404
                     if (cols == null || (cols != null && cols.Length == 0))
401
                     {
405
                     {
402
                         //foreach (DataColumn dc in dt.Columns)
406
                         //foreach (DataColumn dc in dt.Columns)