乔山办公网我们一直在努力
您的位置:乔山办公网 > office365 > ASP.NET读取PPT文件内容并显示到网页上-asp.net预览office,office怎么预览

ASP.NET读取PPT文件内容并显示到网页上-asp.net预览office,office怎么预览

作者:乔山办公网日期:

返回目录:office365


我现在机器从装了,代码都不知道去哪里了,

这个问题我在公司遇到过:
word和excel数据读取的问题,并zd在页面上显示并控制样式,数据最后入库
你这个很简单不用对比格式,就两步骤:
数据读取操作,根据资料自己写的方法
页面控制样式,当初我是用jQuery控制的 隔行变色,光棒效果,表格行高
按照这思路就没问题了,希望对你有用!
网上方法e5a48de588b67a64337不少,可以尝试搜索一下。

第一种方法:
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "Application/msword";
string s=Server.MapPath("E:/wendang/wo582.doc");
Response.WriteFile("E:/wendang/wo582.doc");
Response.Write(s);
Response.Flush();
Response.Close();

第二种方法:
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "Application/msword";
string strFilePath="";
strFilePath =Server.MapPath("E:/wendang/wo582.doc");
FileStream fs = new FileStream(strFilePath,FileMode.OpenOrCreate,FileAccess.Read);
Response.WriteFile(strFilePath,0,fs.Length);
fs.Close();

第三种方法:
string path=Server.MapPath("E:/wendang/wo582.doc");
FileInfo file=new FileInfo(path);
FileStream myfileStream=new FileStream(path,FileMode.Open,FileAccess.Read);
byte[] filedata=new Byte[file.Length];
myfileStream.Read(filedata,0,(int)(file.Length));
myfileStream.Close();
Response.Clear();
Response.ContentType="application/msword";
Response.AddHeader("Content-Disposition","attachment;filename=wo582.doc");
Response.Flush();
Response.BinaryWrite(filedata);
Response.End();

常见word,excel,ppt,pdf在线预览方案,有图有真相,总有一款适合你

http:///rainbowzc/p/3599171.html

相关阅读

  • -html5 预览office,office怎么预览

  • 乔山办公网office365
  • 目前找到的几种方式:1.像以前的百度文库那样,先转换成flash,然后放在网页上。说明:使用软件OpenOffice/LibreOffice,swftools。优点:在国内,由于Flash安装量很大,而且很多人用IE和Ch
关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网