Read CSV files and create their respective tables in mysql

1

This is the function of my button when loading multiple CSV files, I would like to know how to implement the function so that those files can be generated in tables in MYSQL in a database that I already have .

private void examinarActionPerformed(java.awt.event.ActionEvent evt) {                                         
        JFileChooser chooser = new JFileChooser();        
        chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        chooser.setMultiSelectionEnabled(true);

        int status = chooser.showOpenDialog(null);

        if (status == JFileChooser.APPROVE_OPTION) {
            DefaultListModel<String> modelList = new DefaultListModel<String>();
            for (File item : chooser.getSelectedFiles()) {
                modelList.addElement(item.getAbsolutePath());
            }
            rutaArchivos.setModel(modelList);
        }

    }               
    
asked by Rebeca 15.11.2018 в 20:15
source

0 answers