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