public void Write(object target, string excelFileName, string templateFileName) { if (target == null) { throw new ArgumentNullException("target"); } using (ExcelManager em = new ExcelManager()) { em.Open(templateFileName); Write(em, target); em.SaveAs(excelFileName); } }