企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 /** * <b>方法描述:</b> sheet列表 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2019-05-28 16:20:05 <br/> * * @param wb * 入参|工作簿| {@link org.apache.poi.ss.usermodel.Workbook} * @param sheets * 出参|列表| {@link java.util.List} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "sheet列表", style = "判断型", type = "同步组件", version = "1.0.0", deprecated = false, author = "admin", date = "2019-05-28 04:20:05") @InParams(param = { @Param(name = "wb", comment = "工作簿", type = org.apache.poi.ss.usermodel.Workbook.class) }) @OutParams(param = { @Param(name = "sheets", comment = "列表", type = java.util.List.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) public static ResultBase A_getSheets(Workbook wb) { int totalSheet = wb.getNumberOfSheets(); List<Sheet> result = new ArrayList<>(totalSheet); for (int i = 0; i < totalSheet; i++) { result.add(wb.getSheetAt(i)); } return ResultBase.newSuccessResult(result); } 交易中组件使用方式: ![](https://img.kancloud.cn/77/89/77894c6f5376adce1e62388e35e0b8ad_950x750.jpg) ## 参数说明及示例 工作簿:需要获取sheet集合的工作簿,可以是其他技术组件传递过来的工作簿,示例: `__INNER__["wb"]` 列表:当前工作簿的sheet集合,示例: `__INNER__["count"]` > 获取当前工作簿的sheet列表