private void genSimpleExcel() { System.IO.FileInfo filePath = new System.IO.FileInfo(@"C:\Users\MarkShu\Desktop\test1.xlsx"); if (System.IO.File.Exists(filePath.ToString())) { System.IO.File.Delete(filePath.ToString()); } if (!System.IO.File.Exists(filePath.ToString())) { ExcelPackage ep = new ExcelPackage(filePath); ExcelWorksheet ws = ep.Workbook.Worksheets.Add("Sheet1"); ws.Cells[1, 1 , 1 , 3].Value = "Name"; ...