[HttpPost]
        public ActionResult ExportExcel(FormCollection form)
        {

            string strHtml = form["hHtml"];
            strHtml = HttpUtility.HtmlDecode(strHtml);//Html解码
            byte[] b = System.Text.Encoding.Default.GetBytes(strHtml);//字串转byte阵列
            return File(b, "application/vnd.ms-excel", "这是Excel.xls");//输出档案给Client端
        }

 

相关文章:

  • 2021-04-18
  • 2021-07-20
  • 2021-09-21
  • 2021-10-31
  • 2021-12-29
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-01-04
  • 2021-10-12
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
相关资源
相似解决方案