Does google app engine support apache poi?

2019-07-11 19:36发布

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

2条回答
劳资没心,怎么记你
2楼-- · 2019-07-11 20:21

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.

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.

查看更多
走好不送
3楼-- · 2019-07-11 20:37

how to read an excel file on google app engine

http://web.archive.org/web/20100910011509/http://www.z80.fr/2010/03/30/google-app-engine/how-to-generate-excel-files-on-google-app-engine/

Seems some ppl have made poi work on gae by resolving the dependancy errors as they come up, but three are orher ways too,as per second link.gl

查看更多
登录 后发表回答