public void SaveAsActionTest() { var users = User.MakeUsers(); var sheets = new List <EESheet> { new EESheet(users), new EESheet(users, "user data") }; using (var export = new EEExportor(sheets)) { var result = export.SaveAsAction(@"d:\"); Assert.IsTrue(result, "save as excel faild"); } }
public ActionResult Contact() { var users = EasyExcel.Test.Models.User.MakeUsers(); var sheets = new List <EESheet> { new EESheet(users), new EESheet(users, "user data") }; using (var export = new EEExportor(sheets)) { export.StreamAction(); } return(View()); }