简体   繁体   English

将所见即所得内容写入Word文档

[英]Writing wysiwyg content to Word Document

I am using CKeditor to get some data from user and id like to save whatever user types on this very html editor to Word Document without losing the look and feel. 我正在使用CKeditor从用户和id获取一些数据,例如将这个html编辑器上的任何用户类型保存到Word Document,而不会丢失外观。

I have done lot of searching but wansnt able to find any resources actually. 我已经做了很多搜索,但实际上却无法找到任何资源。

Some of which are : How can a Word document be created in C#? 其中一些是: 如何在C#中创建Word文档?

Problem writing HTML content to Word document in ASP.NET 在ASP.NET中将HTML内容写入Word文档时出现问题

so on. 以此类推。

Not sure why there is no clear direction on this. 不知道为什么没有明确的方向。

Any pointers? 有指针吗? libraries you can recommend? 您可以推荐的图书馆?

You can use Open XML sdk to create word documents programatically without installing word on the server. 您可以使用Open XML sdk以编程方式创建word文档,而无需在服务器上安装word。 And you can convert simple html to word document using Html to Openxml . 您可以使用Html到Openxml将简单的html转换为word文档。 Alternatively you can insert the html file into word document as an alt chunk without losing the formatting (unless you using external css). 或者,您可以将html文件作为alt块插入到Word文档中,而不会丢失格式(除非您使用外部CSS)。 An example code for it here and this one . 这里这个示例代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM