We use Apache POI in a limited way with App Engine.  As long as you stay 
away from functions that want to use the local file system and I've heard 
you'll get errors if you try to use any of the graphics-related functions. 
 We're just doing basic spreadsheet manipulation... opening existing excel 
files and using the as templates, populating the sheet with data and saving 
it for the user.  It works great for us, and the object model in POI is a 
lot easier to use than JXL which we also got working on GAE but are moving 
away from in favor of POI.

The error you're getting is because POI is trying to create a temporary 
file on the file system... this functionality will not work on App Engine. 
 What you'll need to do is use streaming.  We store Excel files as 
'templates' in Google Cloud Storage, then we read these as an input stream 
and create our POI worksheet from the template.  Then we manipulate the 
worksheet with POI functions and save the new worksheet as a byte array 
output stream which we in turn write back to GCS.

creating the POI object:
InputStream is = new ByteArrayInputStream(ba);
        Workbook workBook = new XSSFWorkbook(is);

saving the POI object:
        workBook.write(byte_array_output_stream);

        ... then save the byte_array_output_stream to GCS



On Monday, January 20, 2014 10:17:57 AM UTC-6, Alejandro S. wrote:
>
>
> Hello Friends:
>
> I am working on a project where I have to export data to MS Excel files, 
> but I am having the following error:
>
> org.apache.poi.POIXMLException: java.security.AccessControlException: 
> access denied ("java.io.FilePermission" "/tmp" "write")
>
> I've read for there(a couple of links) that Apache POI does not work with 
> App Engine, so my question is simple. Is this true with the last version of 
> the App Engine?, Otherwise, what considerations do I have to have to make 
> my project works?
>
> Thanks a lot.
> Alejandro 
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to