[성현모] Summary Excel Export 추가

This commit is contained in:
SHM
2025-08-12 11:11:54 +09:00
parent f0c63da29d
commit 1201e8ec82
9 changed files with 142080 additions and 148982 deletions

View File

@ -1,6 +1,7 @@
using DevExpress.Utils;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using DevExpress.XtraPrinting;
using DevExpress.XtraVerticalGrid;
using DevExpress.XtraVerticalGrid.Rows;
using System;
@ -409,5 +410,35 @@ namespace SystemX.Product.TRA.UIControl
OnStepSelect(dataSend);
}
}
public override void ExportData()
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
string strFileName = CreateExportFileName();
string strExpPath = dlg.SelectedPath + "\\" + strFileName;
XlsxExportOptionsEx option = new XlsxExportOptionsEx();
string strFile = strExpPath + ".xlsx";
option.ShowGridLines = true;
option.ExportType = DevExpress.Export.ExportType.WYSIWYG;
option.ExportMode = XlsxExportMode.SingleFile;
option.SheetName = "Test Summary";
gridControlMain.ExportToXlsx(strFile, option);
}
}
public string CreateExportFileName()
{
string strFileName = $"{this.ContentsType.ToString()}_{SelectedData.ProductNo}_{SelectedData.TestCode}_{SelectedData.StationName}";
strFileName += $"_{SelectedData.StartTime.ToString("yyyyMMddHHmmss")}-{SelectedData.EndTime.ToString("yyyyMMddHHmmss")}";
return strFileName;
}
}
}