我是网站上的新手。我尝试在打开 excel 文件时写入它(使用 POI / JAVA)。
java.io.FileNotFoundException当我尝试创建文件输出流以写入文件时出现错误。
FileOutputStream没用。我收到以下消息:
该进程无法访问该文件,因为它正被另一个进程使用。
         try {
           FileOutputStream fileOut;
           XSSFWorkbook wb = new XSSFWorkbook(new FileInputStream("Classeur.xlsm")); 
           ...
           ...
           fileOut = new FileOutputStream("Classeur.xlsm");
           wb.write(fileOut);
           fileOut.close();
           }
        catch (FileNotFoundException e){
           e.printStackTrace();
           } 
        catch (IOException e) {
           e.printStackTrace();
           }
有人知道我该如何解决吗?我正在编写一个(POI-Java-Swing)应用程序来动态读取/写入 excel 文件。
谢谢你的帮助