添加文件然后自动打开

               //这里的案例是自动生成excel
string pathstr = System.Web.HttpContext.Current.Server.MapPath("/FilePath"); if (!System.IO.Directory.Exists(pathstr)) System.IO.Directory.CreateDirectory(pathstr); string filePath = Server.MapPath("/FilePath/" + filename); FileStream file = new FileStream(filePath, FileMode.Create); xssfworkbook.Write(file); file.Close();
//重点 System.Diagnostics.Process.Start(filePath);
原文地址:https://www.cnblogs.com/shanshuiYiCheng/p/11535184.html