title: Exporting MySQL database to excel using java code
body: <p>I want to export my MySQL database to .xls or .txt format. How can I do it in java. What I want to do is that there is a button in my application on pressing which, my database export to excel file. 
  Thanks.</p>