💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 组件源码 /** * <b>方法描述:</b> 工作簿清理 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2019-07-18 14:36:33 <br/> * * @param wb * 入参|work|{@link org.apache.poi.xssf.streaming.SXSSFWorkbook} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "工作簿清理", style = "判断型", type = "同步组件", comment = "清理工作簿临时文件,并关闭。", version = "1.0.0", deprecated = false, author = "admin", date = "2019-07-18 02:36:33") @InParams(param = { @Param(name = "wb", comment = "work", type = org.apache.poi.xssf.streaming.SXSSFWorkbook.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) public static ResultBase A_clearWorkbook(SXSSFWorkbook wb) { if (wb == null) return ResultBase.newSuccessResult(); try { wb.dispose(); return ResultBase.newSuccessResult(); } catch (Exception e) { AppLog.error("写工作簿异常", e); return ResultBase.newFailureResult("999", "清理工作簿临时文件:" + AppLog.errorMsg(e)); } finally { try { wb.close(); } catch (IOException e) { e.printStackTrace(); } } } 交易中组件使用方式: ![](https://img.kancloud.cn/79/c9/79c9a30f72188e2a061aae4848bfdae3_950x750.jpg) ## 参数说明及示例 work:工作簿对象,可由其他技术组件传递,示例: `__INNER__["wb"]` > 清理工作簿临时文件,并关闭。