Google App Engine是否支持Apache POI? [英] Does google app engine support apache poi?

查看:48
本文介绍了Google App Engine是否支持Apache POI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要阅读Microsoft Office Word内容的项目.我的问题是:Google App Engine是否支持apache poi?

I have project which require reading content of microsoft office word. My question is : does google app engine support apache poi?

推荐答案

我在Apache POI以及在GAE上读写PowerPoint演示文稿方面都取得了成功.重要的是要避免POI中的调用会调用受安全性限制的java.awt类.为了从文档中读取内容,请避免使用java.awt文件,所以应该没问题.要将内容写入文档,这是您必须要小心的地方.我使用预定义的模板并直接调整文本和字体.这避免了java.awt调用.如果您尝试使用现有文档作为模板来创建新的PPT文档(如POI示例所示),则由于java.awt调用和GAE禁止使用它们而将失败.使用Word文档可能会有所不同,因为我想象会有更少的图形库调用.

I've had success with Apache POI and reading and writing powerpoint presentations on GAE. The important thing is to avoid calls in POI that would invoke the security restricted java.awt classes. For reading content from a document, java.awt files are avoided so you should be fine. For writing content to a document, this is where you have to be careful. I use a predefined template and adjust the text and fonts directly. This avoids java.awt calls. If you try to create a new PPT document using an existing document as a template (as shown in the POI examples), this will fail due to java.awt calls and GAE prohibiting them. Your mileage may vary using Word docs as I imagine there are less graphical library calls.

您可能会遇到Word 2010等新文档格式的麻烦,并且显然必须使用URLfetch/Google Cloud Storage/Blobstore来处理文件.GAE不支持本机文件访问.

You'll probably struggle with new Document formats like Word 2010 and you'll obviously have to use URLfetch / Google Cloud Storage / Blobstore for working with the files. GAE doesn't support native file access.

这篇关于Google App Engine是否支持Apache POI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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