💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 组件源码 /** * <b>方法描述:</b> sheet数 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2021-01-27 15:05:02 <br/> * * @param wb 入参|工作簿|{@link org.apache.poi.ss.usermodel.Workbook} * @param rows 出参|数量|{@link int} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "sheet数", style = "判断型", type = "同步组件", comment = "获取sheet数量", version = "1.0.0", deprecated = false, author = "admin", date = "2021-01-27 03:05:02") @InParams(param = { @Param(name = "wb", comment = "工作簿", type = org.apache.poi.ss.usermodel.Workbook.class) }) @OutParams(param = { @Param(name = "rows", comment = "数量", type = int.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) @Order(value = 2) public static ResultBase P_getSheets(Workbook wb) { int sheetSize = 0; if (wb != null) { sheetSize = wb.getNumberOfSheets(); } return ResultBase.newSuccessResult(sheetSize); } 交易中组件使用方式: ![](https://img.kancloud.cn/0e/41/0e4194f84ab4ef8d44f2d4d44904b8f7_950x750.jpg) ## 参数说明及示例 工作簿:需要获取sheet数量的工作簿,示例: `__INNER__["wb"]` 数量:当前工作簿的sheet数量,示例: `__INNER__["count"]` > 获取sheet数量