JWorkbook
is a free library for Java that can generate spreadsheet files in Gnumeric and Excel format.
Please visit
http://www.jfree.org/jworkbook/index.html
for the latest information about JWorkbook.