企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 /** * <b>方法描述:</b> sheet行数 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2021-01-27 15:05:33 <br/> * * @param sheet 入参|sheet页|{@link org.apache.poi.ss.usermodel.Sheet} * @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:33") @InParams(param = { @Param(name = "sheet", comment = "sheet页", type = org.apache.poi.ss.usermodel.Sheet.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_bookSheets(Sheet sh) { int rowSize = 0; if (sh != null) { rowSize = sh.getLastRowNum() + 1; } return ResultBase.newSuccessResult(rowSize); } 交易中组件使用方式: ![](https://img.kancloud.cn/fc/8b/fc8ba41d5a7ddd9bac63851903dc8da5_950x750.jpg) ## 参数说明及示例 sheet页:需要获取行数的sheet页,可以是其他技术组件或者请求传递过来的sheet对象,示例: `__INNER__["sh"]` 数量:当前工作簿的sheet的总行数,示例: `__INNER__["count"]` > 获取当前sheet行数