Archive for July 2010
2 notes on using Java & Apache POI to read & write Excel spreadsheets
Posted by: rhibbitts
My solution was to use their existing spreadsheets as inputs to my Custom Job Control System. I designed the system to always use the most current version of the relevant spreadsheets (which are always stored on the network in a static location) as data. That way, they can simply control those documents as they always have and they won't have to reconfigure my system when they have changes.
The main thing that makes this system possible is the POI project from the Apache Software Foundation. The POI project is a pure Java API for reading & writing Microsoft Office Documents. It allows simple Java Object Oriented access to MS Excel, Word, PowerPoint, Visio, Outlook & Publisher. However, some parts are still in their infancy. In particular, MS Word access is simple and not very well developed. MS Excel access, however, is about as powerful as you could possibly need. Accessing spreadsheets is simple and powerful, IF you know what parts of the spreadsheet you need to access. The POI project makes it simple to access Excel documents, but Microsoft didn't make Excel documents simple to use (at least from the perspective of the underlying implementation). So, without further ado, here are the 2 most important lessons that I've learned about reading Excel spreadsheets with Apache POI.
