I have the class MysqlToXls copied from here:
http://mikescode.wordpress.com/2008/02/16/exporting-a-mysql-table-to-excel-xls-in-java/
I edited the class making a constructor that doesn't need any parameter in this way:
public MysqlToXls()
throws ClassNotFoundException, SQLException {
// Create MySQL database connection
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost/Spinning?user=root&useUnicode=true&characterEncoding=utf8";
connection = DriverManager.getConnection(url);
}
While there is not any guide I try to do myself and I'm not able.
MysqlToXls m=new MysqlToXls();
m.generateXls("utente", "utenti.xls");
But there are no errors and the file utenti.xls remains blank. Does someone know where is the problem?
utente? Does theResultSetingenerateXls()contain any results?