我从这里复制了类MysqlToXls:http://mikescode.wordpress.com/2008/02/16/exporting-a-mysql-table-to-excel-xls-in-java/我以这种方式编辑了一个不需要任何参数的构造函数的类:publicMysqlToXls()throwsClassNotFoundException,SQLException{//CreateMySQLdatabaseconnectionClass.forName("com.mysql.jdbc.Driver");Stringurl="jdbc:mysql://localhost/