乔山办公网我们一直在努力
您的位置:乔山办公网 > office365 > 请问点聚weboffice能够实现将编辑文件保存到服务器吗?

请问点聚weboffice能够实现将编辑文件保存到服务器吗?

作者:乔山办公网日期:

返回目录:office365


点聚官方网站上有相关的asp.net实例代码的

public partial class upload : System.Web.UI.Page
{
SqlCommand cmd;
SqlConnection cn;
string docTitle, docType;

protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();

string id = Request.Params["DocID"];
docTitle = Request .Params["DocTitle"];
docType =Request .Params ["DocType"];
if (docType == "")
docType = "doc";
if (Request.Files.Count > 0)
{
HttpPostedFile file = Request.Files[0];
int fileLength = file.ContentLength;
byte[] photoArray = new Byte[fileLength];
Stream photoStream = file.InputStream;
photoStream.Read(photoArray, 0, fileLength);

string strcn = ConfigurationManager.ConnectionStrings["WebOffice"].ConnectionString;
cn = new SqlConnection(strcn);
cn.Open();

string sql;
if (!String.IsNullOrEmpty(id))
{
sql = "update WebDoc Set DocContent=@e79fa5e98193e78988e69d83339DocContent where DocID=@ID";
cmd = new SqlCommand(sql, cn);
cmd.Parameters.Add("@ID",SqlDbType.Int).Value =id;
cmd.Parameters.Add("@DocContent", SqlDbType.Binary).Value = photoArray;
cmd.ExecuteNonQuery();
}
else
{
sql = "Insert into WebDoc(DocTitle,DocType,DocContent) values(@DocTitle,@DocType,@DocContent)";
cmd =new SqlCommand(sql,cn);
cmd.Parameters.Add("@DocTitle", SqlDbType.VarChar, 50).Value = docTitle;
cmd.Parameters.Add("@DocType", SqlDbType.VarChar, 10).Value = docType;
cmd.Parameters.Add("@DocContent", SqlDbType.Binary).Value = photoArray;
cmd.ExecuteNonQuery();
}
cn.Close();
Response.Write("succeed");
Response .End();
}
else
Response.Write("fail");
}
}

随便什么符号都行,只要不在非换行的地方出现就行最好用个特殊的如“~”

然后在Word里面用替换→高级→将“~”替换为特殊字符里面的手动换行符→全部替换就行

 

不知道是不是这个问题

 

希望对你有所帮助



用2016的版本试试看,
1、将压缩包内文件夹o16_x86和o16_x64都解压出来;
PS:两个文件夹都为zd必要文件,若是缺少一个文件夹会导致无法安装。
2、打开其中的o16_x86文件夹点击setup.cmd;
3、自动弹出cmd弹窗后,进入下载安装;
PS:请耐心等待,不要关闭计算机,直至安装完成。
4、安装完成后打开“开始”菜单中找到Microsoft Office 2016 Previe;
5、选中需要的软件打开即可使用,无需其他操作。

相关阅读

关键词不能为空
极力推荐

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