View Code
 string file = Server.MapPath("Library/现场服务商评价日报.xls");
            Workbook workbook = new Workbook(file);
            HtmlSaveOptions option = new HtmlSaveOptions(SaveFormat.Html);
            System.IO.MemoryStream stream = new System.IO.MemoryStream();
            workbook.Save(stream, SaveFormat.Html);
            string html = System.Text.Encoding.UTF8.GetString(stream.ToArray());
            HttpContext.Current.Response.ContentType = "text/html; charset=utf-8";
            HttpContext.Current.Response.Write(html);
            HttpContext.Current.Response.Flush();
            HttpContext.Current.Response.End();

View Code

string fullpath = Server.MapPath("Document/Template/a.doc");
        Document doc = new Document(fullpath, LoadFormat.Doc, null);
        doc.Save("a.mhtml", SaveFormat.Mhtml, SaveType.OpenInBrowser, HttpContext.Current.Response);

 

相关文章:

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