The POI project consists of APIs for manipulating various file formats based upon Microsoft's OLE 2 Compound Document format using pure Java. In short, you can read and write MS Excel files using Java. Soon, you'll be able to read and write word files using Java. POI is your Java Excel solution as well as your Java Word solution. However, we have a complete API for porting other OLE 2 Compound Document formats and welcome others to participate.
I've used POI on the job and it works great. It does (or at least did when I last used it) model the Excel format fairly directly, which requires that the developer needs to have some cognizance of how Excel stores data. Excel has a pretty crappy format. But once you understand it, POI's not hard to use.
Another option that works well if you're using spreadsheets as input is to have your spreadsheets saved as XML and then use XPath (or DOM or what-not) to navigate to the pieces you want to work with. That's pretty slick if you can hand out an input template with named sheets, named ranges and sheet/workbook protection, because there will be XML elements that help you identify cells semantically. As far as I know, saving as XML can only be done with Excel XP/2003.
I didn't know that the combination of XML and XPath was possible for spreadsheets. Is this solution straightforward or do you have to have a lot of experience with MS XML, maybe there are some strange side effects, to generate spreadsheets like that? Can you also import the xml structure as an excel spreadsheet? [ October 03, 2004: Message edited by: Arnold Reuser ]