import java.io.FileOutputStream;

import org.dbunit.database.DatabaseConnection;
import org.dbunit.dataset.IDataSet;
import org.dbunit.dataset.excel.XlsDataSet;

public class DataExport {
  public static void main(String[] args) throws Exception {
    DBAccessor db = new DBAccessor("org.sqlite.JDBC","jdbc:sqlite:resource/test.db3","","");
    
    DatabaseConnection con = new DatabaseConnection(db.getConnection());
    IDataSet dataset = con.createDataSet();
    // IDataSet dataset = con.createDataSet(new String[] {"test2"});
    XlsDataSet.write(dataset, new FileOutputStream("resource/export_all.xls"));
    
  }
}