Apache POI 单词支持有多好?

发布于 2024-07-09 12:01:25 字数 185 浏览 7 评论 0原文

在网页上,旧样式.doc看起来没有当前开发。

  • 它足以创建复杂的文档吗?
  • 它可以读取所有 .docs 而不会崩溃吗?
  • 哪些功能有效(无效)?

我目前对基于 XML 的格式不感兴趣,因为我不控制客户端。

excel支持似乎好得多。

On the web page, it looks like there is no current development in the old style .doc.

  • Is it good enough to create complex documents?
  • Can it read all .docs without crashing?
  • What features do (not) work?

I am not currently interested in the XML based formats, as I don't control the client side.

The excel support seems to be much better.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

身边 2024-07-16 12:01:25

如果您正在寻找以编程方式读取或写入文档文件的方式,我相信您最好使用远程 OpenOffice 或 StarOffice。 我们在一家前公司做过这样的事情,尽管这是一个相当繁重的解决方案,但效果很好。 OpenOffice(紧随 Word 之后)拥有非常好的文档支持。 对于远程处理来说,它比 Word 本身要好得多。 在上述公司,我们(之前)经常远程控制Word,但经常出现问题,因为Word(保存文档时)坚持不时显示警告对话框。 将服务器放在某个数据中心深处,没有人靠近它是个坏主意。

由于这是一家 Java 商店,OpenOffice 对 Java 的良好支持就派上了用场。 事实上,他们甚至曾经捆绑商业版本的 StarOffice,并且在 Sun 上有一些非常好的联系和帮助。

免责声明:正如 andHapp 和 alepuzio 所说,POI 对 Excel 的支持非常好,我使用它取得了巨大的成功。 上次我看到文档支持时,我不敢在生产中使用它(对于客户)。 我至少有两年没有看过文档支持了。

If you are looking for programmatically reading or writing doc files, I believe you're better of with remoting OpenOffice or StarOffice. We've done this at a former company, even though it's a pretty heavy solution, it worked quite well. OpenOffice has (right after Word) a very good doc-Support. For remoting it's a lot better than Word itself. At said company we (earlier) used to remotecontrol Word with frequent problems because Word (on saving a document) insisted on displaying a warning dialog from time to time. Bad idea on a server deep down in some datacenter with nobody close to it.

As this was a Java shop, the very good OpenOffice support for Java came in handy. In fact, they even used to bundle the commercial version StarOffice and had some very good contacts at and help from Sun.

Disclaimer: As andHapp and alepuzio said, POI is very good in Excel support and I'm using it with big success. Last time I've seen the doc support, I didn't dare using it in production (for customers). I haven't looked at doc support for at least two years.

静若繁花 2024-07-16 12:01:25

我已经使用 Apache POI 来读取和写入 Excel 文件 (.xls),它的工作方式就像一个魅力。 存在一些问题,但我找到了简单的解决方法,因此我认为 Word 文档也是如此。 您遇到的唯一问题是读取和写入 .docx(在我的例子中为 .xlsx)格式,因为 Apache POI 尚不支持它们。

I have used the Apache POI For reading and writing Excel files (.xls) and it works like a charm. There were a few issues but I found easy workarounds so I assume it would be the same for the word documents. The only issue you would have is with reading and writing the .docx (.xlsx in my case) format since Apache POI does not support them yet.

这取决于你的目标。
我用POI编写了Excel格式的报告,简单的报告还可以,因为简单操作的代码很多。
我编写了一些用于重复任务的实用方法。
如果您为 java =>1.5 编写代码,您可以尝试 JXLS(它扩展了 POI 并使用 XML/XSLT 技术)。

It dependes by your goal.
I code with POI for report in Excel format and it's ok for simple report, because there'a a lot of code for simple operation.
I coded some utility methods for repeating task.
If you code for java =>1.5 you try JXLS (what extends POI and use XML/XSLT technologies).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文