页面文件预览,在线等
现有代码:
string strFilename = "C:\\Users\\admin\\Desktop\\aa.doc";
System.IO.FileInfo DownloadFile = new System.IO.FileInfo(strFilename);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = true;
Response.Charset = "utf-8";
Response.ContentType = "application/msword";
Response.AppendHeader("Content-Disposition",
"Attachment;FileName=" +
HttpUtility.UrlEncode("qqq.doc", Encoding.UTF8));
Response.ContentEncoding = Encoding.UTF8;
Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.End();
结果成了下载了!我不是要下载下来 是要到新的页面将word里面的东西显示出来!
相关推荐
本地odf文件实现html页面在线预览,ofd文件预览,文件流转文件
后端读取本地文件,返回文件流,前端进行预览 1、后端返回文件流 2、前端发起请求,返回文件流,对文件流进行处理生成文件,在页面预览
基于threejs实现stl三维模型文件在线预览,结合vue实现页面逻辑_stlview.zip
基于threejs实现stl三维模型文件在线预览,结合vue实现页面逻辑_stlview
java实现poi 在线预览,excel,word直接在页面显示,附带文件上传,多文件上传
所需poi的jar包: commons-collections4-4.1.jar poi-3.17.jar poi-examples-3.17.jar poi-excelant-3.17.jar poi-ooxml-3.17.jar poi-ooxml-schemas-3.17.jar poi-scratchpad-3.17.jar xmlbeans-2.6.0.jar maven项目,可以直接加pom配置: <!-- poi--> org.apache.commons commons-collections4 4.1 org.apache.poi poi 3.17 org.apache.poi poi-examples 3.17 org.apache.poi poi-excelant 3.17 org.apache.poi poi-ooxml 3.17 org.apache.poi poi-ooxml-schemas 3.17 org.apache.poi poi-scratchpad 3.17 org.apache.xmlbeans xmlbeans 2.6.0
php实现在线预览功能
实现pptx,ppt,xls,xlsx,doc,docs,pdf在线预览
Asp.net mvc 在线预览、在线预览Word、Excel、PDF等
在线预览PDF、Word、Txt等文本文件 Microsoft.Office.Interop.Word Microsoft.Office.Interop.Excel


