We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
IMO 的答案是否定的,原因如下:
Microsoft Office 文档的设计方式极其复杂,不仅仅是一个引用图像等对象的格式化文件,其内部还有一个 od 类型的文件系统需要管理这些对象的二进制数据。
让我引用我们自己的乔尔的话:
继续阅读以获取可能的解决方案:
@source:http://www.joelonsoftware.com/items/2008/02 /19.html
您在旅途中可能会感兴趣的一些链接:
虽然,尝试使用 winrar 打开一个 word 文件;),也许创建一个具有某些标题的存档,然后更改扩展名就足够了,从未尝试过
The answer IMO Would be no, For the following reasons:
Microsoft Office Documents are extremely complex in the way they are designed, there not just a formatted file with references to objects such as images, there is a type od file system within itself to manage the binary data of these objects.
Let me bring in a quote from our very own Joel:
Read further down for a possible solution:
@source: http://www.joelonsoftware.com/items/2008/02/19.html
Some links that may interest you along your journey:
Although, Try opening a word file with winrar ;), Maybe creating an archive with certain headers and then changing the extenstion will suffice, Never Tried
为了转换为 Microsoft Word,您需要一个支持 COM 的服务器(在其上运行 Windows 和 Office)。如果你有这样的服务器
应该可以工作!阅读 http://php.net/manual/en/book.com.php 了解详情。
否则,您最好的 html2doc 是 html2rtf,它是通过 http://paggard.com/ 等库实现的items/rtf.generator/ 或 http://sourceforge.net/projects/phprtf/。
然后,在创建 RTF 后,您可以使用文档标题将其提供给浏览器。
如果用户有单词,则它将打开以处理该文件。
另外,将 rtf 保存为 doc 是可以的,并且 word 将在布局视图中打开,没有任何抱怨。
您还可以使用上述标头提供 HTML,但问题是 Word 将在 Web 视图中打开,这很糟糕:)
in order to convert to Microsoft Word you need an COM enabled server (running Windows and Office on it). If you have such a server
should work!. Read http://php.net/manual/en/book.com.php for details.
Otherwise your best shot at html2doc is html2rtf which is achieved with a library such as http://paggard.com/projects/rtf.generator/ or http://sourceforge.net/projects/phprtf/.
Then after you create the RTF you serve it to the browser with a doc header
If the user has word then it will be open to handle the file.
Also saving an rtf as doc is ok and word will open in layout view without any complaints.
You can also serve HTML with the above header but the problem is that Word will open in web view and that is bad :)