org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save

前端 未结 6 1221

I\'m facing org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save:an error occurs while saving the package : The part /docProps/app.xml fail to b

6条回答
  •  抹茶落季
    2020-12-06 18:21

    I had the same problem user refreshing page and sending the request again before the previous request is completed. when creating the name use millisecond in name to avoid name conflict with these updates in code of name creation resolved the above issue.

           String sheetName="projectName"+System.currentTimeMillis() + ".xlsx"
           FileOutputStream fileOut = new FileOutputStream(sheetName);
           workbook.write(fileOut);
           fileOut.close();
    

提交回复
热议问题