需要一些有关 GUI 表单的帮助,我正在尝试将其用于 excel 读写
提前谢谢
ReadExcel read = new ReadExcel();
JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());
String line = null;
String name= null;
String INPUT_FILE_LOCATION = null;
List<String> names = new ArrayList<String>();
int returnValue = jfc.showOpenDialog(null);
// int returnValue = jfc.showSaveDialog(null);
if (returnValue == JFileChooser.APPROVE_OPTION) {
File selectedFile = jfc.getSelectedFile();
FileInputStream fis = new FileInputStream(selectedFile);
BufferedReader br = new BufferedReader(new InputStreamReader(fis));
INPUT_FILE_LOCATION = br.readLine();
while ((line = br.readLine()) != null) {
name= line;
names.add(line);
System.out.println("-------------------------------------------------------------------------------------------------------------------------------------------------");
System.out.println("name is:::" + name);
System.out.println("-------------------------------------------------------------------------------------------------------------------------------------------------");
}
System.out.println(selectedFile.getAbsolutePath());
}
read.getData(INPUT_FILE_LOCATION, IS_SERVICES);
System.out.println("IS_SERVICES::: " + IS_SERVICES.size());
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句