123456789101112131415161718192021 package imagetest;import javax.swing.*;import java.awt.*;import java.awt.event.*;public class Test extends JFrame { public Test() { JButton btn = new JButton("关闭"); this.add(btn, BorderLayout.WEST); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setSize(300, 300); btn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if(JOptionPane.showConfirmDialog(Test.this, "确定关闭吗?","确认",JOptionPane.OK_CANCEL_OPTION)==0) System.exit(0);} }); } public static void main(String[] args) { new Test().setVisible(true); }}
先用poi解析excel中的数据,然后再将数据插入到数据库中
你的说是cs/ 还是bs 模式下?
解析EXCEL,读取内容,一条条数据插入到数据库啊。