public static void openTemplate_v2(string ip_file_name)
{
string sourcePath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"Template";//Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Template\");
string targetPath = saveFileDialog(ip_file_name);
if (targetPath !="")
{
string sourceFile = System.IO.Path.Combine(sourcePath, ip_file_name);
System.IO.File.Copy(sourceFile, targetPath, true);
XtraMessageBox.Show("Đã lưu file mẫu tại " + targetPath +".\nFile sẽ tự động mở ngay sau đây!","Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
var excel = new Excel.Application();
excel.Visible = true;
Excel.Workbooks books = excel.Workbooks;
Excel.Workbook openexcel = books.Open(targetPath);
}
}