Question: how to export data from mysql to excel using java?
Answer: You can use BIRT and generate your database to any format you want. If you are using struts2 you can use datagrid to export it to CSV or Excel. Alternatively you can implement code using JDBC or ORM that connects to DB, reads data and writes it using any format you want. You can use Mysql-JDBC driver and Apache POI.