string template = "Template.ods";    
    string path = Server.MapPath(System.Configuration.ConfigurationSettings.AppSettings["TemplateSavePath"].ToString().Trim()+template);
    Response.Clear();
    Response.AppendHeader("Content-Disposition", "attachment;filename=" + template);
    //Response.ContentType = "application/ms-excel"; //Excel 就用这
    Response.ContentType = "application/vnd.oasis.opendocument.spreadsheet";
    Response.WriteFile(path);//传输到客户端   
    Response.End();

相关文章:

  • 2021-11-18
  • 2022-12-23
  • 2021-12-02
  • 2021-12-03
  • 2022-12-23
  • 2021-07-10
  • 2021-11-28
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2022-02-08
  • 2021-09-19
  • 2022-03-04
  • 2021-05-23
  • 2021-12-15
相关资源
相似解决方案