Each
application is designed because there was initially a first original need, WorkbookTag and WorkbookHtmlConverter modules solve specific problems you probably
have regarding Excel workbooks sharing…
A couple of months ago I
was faced to a very particular problem. As a software Java consultant I was a
member for the maintenance of an existing Struts 1.x legacy application used
since 2005. The new requirement expressed by the client was to be able to mimic
an existing Microsoft Excel workbook as HTML. Not just to display the existing
information, but really allow the users to modify numbers entered inside some
cells and refresh the screen when other cells were displaying computed formula
results.
I immediately started to look at a popular
existing API: Apache POI project. The guys at Apache have done wonderful work
for opening the Microsoft proprietary formats to the Java world. I was almost
convinced there was a product to simply convert *.xls binary files into HTML
documents so half the work would then be done!
Unfortunately there was nothing matching
exactly was I was looking for. So I took a look at the effort for developing
something light and usable inside a Java web application. The concrete
technology involved was:
·
Compatibility with Java
·
Avoiding Microsoft
Office installation onto the workstation
·
Integration with
existing web application
·
Embedded inside Jsp or
other templating framework
·
Able to automatically
convert xls files to pure DHTML
·
Allowing interaction
with the user for editable cells
·
Session based (each user
modifying it’s own virtual workbook)
After a couple of weeks of development,
I’m pleased to present the WorkbookTag product. In fact I really hope this
project is a starting point for multiples projects, but for now there is a tag
library module (WorkbookTag) and a simple Java Swing based module
(WorkbookHtmlConverter). The first one is intended for integration inside Web
Application projects like JSF, Struts 1.x, Struts 2.x, Spring MVC, etc. The
second module is intended for people needing simply to convert existing Excel
workbook into HTML. The good news: these modules don’t require Microsoft Office
classic installation and licence.
To see the WorkbookTag in action I created
a simple Web ARchive file (war) that can be automaticaly deployed on popular
web application servers (jBoss, Tomcat, Jetty, Websphere, etc.). This demo application show the live convertion of multiple
kind of worksheets and also allow user to upload his own worksheet to see the
HTML convertion result. There is aslo a demo of an editable worksheet
demonstrating cells updates and formula result refreshed live.
The following screen capture shows an existing Excel timesheet: |
And now the same timesheet rendered live into DHTML with |
The WorkbookTag source code and demo application can be downloaded from Sourceforge.net and a little online utility application using the WorkbookHtmlConverter application can be installed from here. If you like the results then download the full featured application from Sourceforge.net !
André Masson (amwebexpert@gmail.com)