[Java] 基本操作--Excel--更新并生成新的Excel →→→→→进入此内容的聊天室

来自 , 2021-01-04, 写在 Java, 查看 122 次.
URL http://www.code666.cn/view/7f53f8c6
  1.         public static void exportNewExcelByPathXls(HSSFWorkbook targetExcel,String resultPath )
  2.                         throws FileNotFoundException, IOException {
  3.                 FileOutputStream fileOutputStream = new FileOutputStream(resultPath);
  4.                 targetExcel.write(fileOutputStream);
  5.                 fileOutputStream.flush();
  6.                 fileOutputStream.close();
  7.                 targetExcel.close();
  8.         }
  9.        
  10.         public static void exportNewExcelByPathXlsx( XSSFWorkbook targetExcel,String resultPath)
  11.                         throws FileNotFoundException, IOException {
  12.                 FileOutputStream fileOutputStream = new FileOutputStream(resultPath);
  13.                 targetExcel.write(fileOutputStream);
  14.                 fileOutputStream.flush();
  15.                 fileOutputStream.close();
  16.                 targetExcel.close();
  17.         }

回复 "基本操作--Excel--更新并生成新的Excel"

这儿你可以回复上面这条便签

captcha