|
|
@@ -17,6 +17,10 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
DataHelper dh = SystemInf.dh;
|
|
|
|
|
|
+ //展示抬头日期的索引
|
|
|
+ int ShowDataIndex = 7;
|
|
|
+ //展示芯片尺寸的索引
|
|
|
+ int ShowSizeIndex = 5;
|
|
|
/// <summary>
|
|
|
/// 导出Excel,返回文件在客户端的路径
|
|
|
/// </summary>
|
|
|
@@ -584,7 +588,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (j==6)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -605,11 +609,11 @@ namespace UAS_LabelMachine
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ "(" + DataTable.Rows[i]["me_desc"].ToString() + ")" + DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 5)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (j == 6)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
}
|
|
|
@@ -648,6 +652,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j - 4].SetCellValue(DataTable.Columns[j].Caption);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (DataTable.Columns[j].ColumnName.ToString() == "io_qty")
|
|
|
{
|
|
|
NumIndex = j;
|
|
|
@@ -683,6 +688,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
//固定行号分组的时候自动拼接新的DataTable
|
|
|
if (i == rowNum - 1)
|
|
|
@@ -755,6 +765,7 @@ namespace UAS_LabelMachine
|
|
|
pib_id.Add(DataTable.Rows[i]["pib_id"].ToString());
|
|
|
pib_outboxcode1.Add(BoxCode.ToString());
|
|
|
}
|
|
|
+ Console.WriteLine(sheet.LastRowNum);
|
|
|
//for (int i = 0; i < sheet.LastRowNum; i++)
|
|
|
//{
|
|
|
// //if (i != 0)
|
|
|
@@ -822,7 +833,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (j==6)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -843,11 +854,11 @@ namespace UAS_LabelMachine
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ "(" + DataTable.Rows[i]["me_desc"].ToString() + ")" + DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 5)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (j == 6)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
}
|
|
|
@@ -915,6 +926,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
|
@@ -1046,7 +1062,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (j==6)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -1067,11 +1083,11 @@ namespace UAS_LabelMachine
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ "(" + DataTable.Rows[i]["me_desc"].ToString() + ")" + DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 5)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (j == 6)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j).SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
}
|
|
|
@@ -1139,6 +1155,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
|
@@ -1430,7 +1451,6 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
sheet.PrintSetup.NoColor = true;
|
|
|
sheet.PrintSetup.Landscape = true;
|
|
|
- sheet.PrintSetup.PaperSize = (short)PaperSize.A4;
|
|
|
//芯片号需要作为更新盒号的条件
|
|
|
HSSFFont ffont = (HSSFFont)book.CreateFont();
|
|
|
ffont.FontName = "宋体";
|
|
|
@@ -1660,7 +1680,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -1682,12 +1702,12 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 4)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
@@ -1774,6 +1794,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
//固定行号分组的时候自动拼接新的DataTable
|
|
|
if (i == rowNum - 1)
|
|
|
@@ -1918,7 +1943,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -1940,12 +1965,12 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 4)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
@@ -2026,6 +2051,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
|
@@ -2164,7 +2194,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -2186,12 +2216,12 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 4)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
@@ -2273,6 +2303,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
|
@@ -2802,7 +2837,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -2821,15 +2856,15 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString()
|
|
|
+ row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString()
|
|
|
+ "_(" + DataTable.Rows[i]["me_desc"].ToString() + ") " + DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 4)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
@@ -2909,6 +2944,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
//固定行号分组的时候自动拼接新的DataTable
|
|
|
if (i == rowNum - 1)
|
|
|
@@ -3092,7 +3132,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -3114,12 +3154,12 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ "(" + DataTable.Rows[i]["me_desc"].ToString() + ") " + DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 4)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
@@ -3193,6 +3233,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
|
@@ -3372,7 +3417,7 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_title"].Caption + ":" + DataTable.Rows[i]["pi_title"].ToString() + " "
|
|
|
+ DataTable.Columns["ch_level"].Caption + ":" + DataTable.Rows[i]["ch_level"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_inoutno"].Caption + ":" + DataTable.Rows[i]["pi_inoutno"].ToString());
|
|
|
@@ -3394,12 +3439,12 @@ namespace UAS_LabelMachine
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_orispeccode"].Caption + ":" + DataTable.Rows[i]["pr_orispeccode"].ToString() + " "
|
|
|
+ "(" + DataTable.Rows[i]["me_desc"].ToString() + ") " + DataTable.Columns["pi_chipouttype"].Caption + ":" + DataTable.Rows[i]["pi_chipouttype"].ToString());
|
|
|
}
|
|
|
- else if (j == 4)
|
|
|
+ else if (j == ShowSizeIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pr_size"].Caption + ":" + DataTable.Rows[i]["pr_size"].ToString());
|
|
|
}
|
|
|
- else if (columnNum > 15 && j == columnNum - 15)
|
|
|
+ else if (j == ShowDataIndex)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
row1.Cells[j].SetCellValue(DataTable.Columns["pi_date"].Caption + ":" + DataTable.Rows[i]["pi_date"].ToString());
|
|
|
@@ -3472,6 +3517,11 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j - 4].SetCellValue(i + 1);
|
|
|
}
|
|
|
+ if (DataTable.Columns[j].ColumnName == "ch_code")
|
|
|
+ {
|
|
|
+ sheet.AutoSizeColumn(j - 4);
|
|
|
+ sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
+ }
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|