예제 #1
0
        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");
            }
        }
예제 #2
0
        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());
        }