There is CSVWriter
class for writing resultset to CSV file.
Is there any similar class for writing resultset output to EXCEL
file.??
Edit: My resultset data will be dynamic so I just want to dump the resultset data into excel file
Edit2: Ref http://www.codereye.com/2009/09/converting-resultset-to-excel-table-in.html. It exports the data to excel sheet but I need to pas the datatype of each column .I want to remove that dependency so that whatver is in the resultset ,blindly it should export to excelsheet.
I recently used OpenCSV, it worked fine for me. Here, for example, how to write a ResultSet
to a CSV file:
java.sql.ResultSet myResultSet = ...
writer.writeAll(myResultSet, includeHeaders);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With