[성현모] Summary Excel Export 추가
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user