commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Fortner <phidia...@gmail.com>
Subject Re: Windows XP Compressed Folders doesn't recognize my VFS-based zip file
Date Wed, 06 Jan 2010 15:54:30 GMT
Hi Stephen,
So if I understand your use case, you needed to be able to generate
Word and Excel reports. I had a similar requirement a while back and
used Microsoft's uncompressed  XML formats -- I simply saved the Word
and Excel files as  XML and inserted Velocity templating code in the
XML. I then made a servlet that handled the merging of data into the
template. It worked pretty well. The users would simply click on a
link and the report would then open up in either Word or Excel.  I
think the file format was supported in Word 2003, and since this was
an internal app we didn't have any concerns about supporting the older
file formats.

Hope this helps,

Mark

On Tuesday, January 5, 2010, Stephen Huey <stephenhuey@gmail.com> wrote:
> That might work with some source code modifications.  I remember digging
> through a bit of the Java example code here and realizing there were
> scattered references to the File class:
>
> http://openxmldeveloper.org/archive/category/1008.aspx
>
> GAE does not provide access to a file system, but GaeVFS would probably fix
> that issue with regard to the OpenXML4J code if I went into its source and
> edited references to that.  However, I'd imagine there would still be
> dependencies on unsupported libraries such as graphics for manipulating rich
> text even though the resulting files are just XML.  We don't have to change
> the design of our Word and Excel reports very much, so it's not too much
> work for us if we just manually create a template by typing up something
> pretty in each Microsoft Office application and then take that file and
> replace pieces of it with our dynamic data.  Yes, we're writing from scratch
> some code that POI already handles, but we already know our way works and
> the requirements are fairly minimal and static, so it doesn't seem
> worthwhile at this point to adapt POI to Google App Engine.
>
> That doesn't mean I don't wish it worked on there!  I'd be interested in
> hearing that it actually wouldn't be too difficult since all those classes
> are already written...
>
> Thanks,
> Stephen
>
>
>
> On Tue, Jan 5, 2010 at 8:05 PM, Mark Fortner <phidias51@gmail.com> wrote:
>
>> Hi Stephen,
>> Here's a link to the POI Components page.
>> http://poi.apache.org/overview.html#components
>> If I remember correctly you need to add the poi-ooxml maven artifact to
>> your
>> build.
>>
>> There are some examples Here :
>> http://poi.apache.org/spreadsheet/examples.html
>>
>> I'm not sure that this fixes the problem that GAE has with the AWT API.
>>  The
>> main complaint in the bug report had to do with the usage of the Color
>> class, which may be used in a number of places to get or set the cell
>> color.
>>
>> The API was donated to the POI project, but started out as the OpenXML4j
>> project on sourceforge. https://sourceforge.net/projects/openxml4j/
>>
>> That version may not have any POI dependencies and may suit your needs
>> better.
>>
>> Mark
>>
>>
>> On Tue, Jan 5, 2010 at 4:28 PM, Stephen Huey <stephenhuey@gmail.com>
>> wrote:
>>
>> > Apache POI is currently labeled as Incompatible on Google App Engine:
>> >
>> >
>> >
>> http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
>> >
>> > This post explains that awt references and maybe other similar issues are
>> > the problem:
>> > https://issues.apache.org/bugzilla/show_bug.cgi?id=47497
>> >
>> > I'm not familiar with the separate module for xlsx and docx, so perhaps
>> it
>> > would run on GAE if it can be used independently of the modules that use
>> > libraries not currently supported on GAE.  I'd be interested in knowing
>> if
>> > that's the case!
>> >
>> > Thanks so much,
>> > Stephen
>> >
>> >
>> >
>> > On Tue, Jan 5, 2010 at 6:00 PM, Mark Fortner <phidias51@gmail.com>
>> wrote:
>> >
>> > > Hi Stephen,
>> > >
>> > > Thanks for posting this. I read your blog entry as well. You mention
>> > > in passing that POI doesn't support the new formats. There's a
>> > > separate module that is supposed to support xlsx and docx formats. I
>> > > was able to use them in the past. Was there some particular "gotcha"
>> > > that people should keep an eye out for?
>> > >
>> > > Regards,
>> > >
>> > > Mark
>> > >
>> > > On Tuesday, January 5, 2010, Stephen Huey <stephen.huey@gmail.com>
>> > wrote:
>> > > > For posterity's sake, I meant to come back here and post the solution
>> a
>> > > > while ago.  I've got the full story here in this blog post:
>> > > >
>> > > > http://stephenhuey.wordpress.com/2010/01/01/docxgae/
>> > > >
>> > > > The relatively new Microsoft Office formats ending with extensions
>> such
>> > > as
>> > > > .docx and .xlsx are zip files of directories of text files (XML) and
>> > > images.
>> > > >  Tried-and-true Java libraries for writing the old binary Microsoft
>> > Word
>> > > and
>> > > > Excel formats aren't yet supported on Google App Engine, so I was
>> glad
>> > to
>> > > > get this working since it was a required feature for our application.
>> > > >
>> > > > My modified code for the zipDir and addDir methods is below.  As
you
>> > can
>> > > > see, I'm closing the ZipOutputStream rather than the OutputStream:
>> > > >
>> > > >
>> > > > + + + + +

-- 
Mark Fortner

blog: http://feeds.feedburner.com/jroller/ideafactory

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message