i have tried out one option ..just thought of sharing it with you
you can use xl template file .
simplest way is to use jxls api
fetch data rows from DB, put them in a bean
use transform function to generate xl file filled up with the data..
Configuration cf = new Configuration();
XLSTransformer transformer = new XLSTransformer(cf);
beans is a map containing required data..
target.xls will be your result xls...
just try this, you can serch on it in details on net
all the best !