[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端
        }

 

相关文章:

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