替代的Office互操作的文档生成 [英] Alternative to Office Interop for document generation

查看:128
本文介绍了替代的Office互操作的文档生成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我们正在使用的Office互操作产生从Office 2003模板文件(的Word,Excel和放大器; Powerpoint等)。这似乎在(见<一个相当皱起眉头href=\"http://stackoverflow.com/questions/1031513/office-interop-with-64bit-windows-in-asp-net\">office-interop-with-64bit-windows-in-asp-net)和同时能正常工作,我会用一个支持的解决方案更快乐。

At the moment we're using office interop to generate documents from templates in office 2003 (word, excel & powerpoint). This seems to be rather frowned upon (see office-interop-with-64bit-windows-in-asp-net) and whilst it works fine I would be happier with a supported solution.

什么非哈克的方法是有这样做吗?要求

What non hacky method is there to do this? Requirements are


  1. 的Office 2003只。 (没有Office XML / Office 2007的兼容包允许的)

  2. 必须从ASP.NET运行服务器端

  3. 必须是能够创建的Word,Excel和放大器;从用户提供的.DOT,名为.xlt PowerPoint文档和模板.POT

  4. 必须能够在某些点例如替换某些文本,以进一步自定义docouments姓名,地址等

  5. 免费或成本非常低。我不打算要能够提高采购订单更换工作制,理由是四人在一些网站认为这是一个肮脏的黑客;)

我不知道有更好的办法。有没有?

I'm not sure there is a better way. Is there?

推荐答案

我刚刚张贴了这个作为回答有关自动化办公的另一个问题,但我认为这是对这个问题的适当反应太(特别是因为你正在寻找一个免费或低费用的解决方案)。

I just posted this as an answer to another question about automating Office, but I think it's a suitable response to this question too (especially since you are looking for a free or low cost solution).

我已经没有任何问题(性能较差,挂流程,破碎流程等)的Web服务使用Microsoft Excel,Word和PowerPoint通过互操作打印Office文档为PDF格式结束。我也曾经面临,我怀疑是因为看不见的对话框的问题(可能是文件损坏,建议只读已定,文件密码保护,或其他)。

I've had no end of problems (poor performance, hanging processes, crashing processes etc) using Microsoft Excel, Word and PowerPoint through interop in a web service to print Office documents to PDF format. I too have faced problems that I suspect are because of invisible dialog boxes (maybe a file is corrupt, read-only recommended has been set, file is password protected, or whatever).

我知道有工具使用不使用Office,但他们都非常昂贵。我的解决办法是切换到自动化的OpenOffice。 OpenOffice的似乎更稳定了,我已经离开了挂过程等的后面。

I know there are tools available that don't use Office, but they are very expensive. My solution was to switch to automating OpenOffice. OpenOffice seems to be much more stable, and I've left hanging processes and the like behind.

所以,当我想我说:不要自动化的Microsoft Office,我不建议你放弃完全自动化;只是,我已经有的更大的成功自动化的OpenOffice比微软的Office。

So, while I suppose I am saying "don't automate Microsoft Office", I'm not suggesting that you abandon automation altogether; just that I've had much more success automating OpenOffice than Microsoft Office.

这篇关于替代的Office互操作的文档生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆