예제 #1
0
        public ActionResult DownloadBook(Letter letter)
        {
            XWPFDocument doc = RollExcelManager.SaveWord(letter);
            MemoryStream ms  = new MemoryStream();

            doc.Write(ms);
            ms.Flush();
            byte[] fileContents = ms.ToArray();
            return(File(fileContents, "application/octet-stream", string.Format("{0}-{1}.docx", letter.Name, letter.Book.GetDescription())));
        }
예제 #2
0
        public ActionResult DownloadWord()
        {
            XWPFDocument doc = RollExcelManager.SaveWord(Core.RollViewManager.GetRollList(BREnum.Black, null, true));
            MemoryStream ms  = new MemoryStream();

            doc.Write(ms);
            ms.Flush();
            byte[] fileContents = ms.ToArray();
            return(File(fileContents, "application/octet-stream", "黑名单公告.docx"));
        }