多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 组件源码 /** * <b>方法描述:</b> 工作簿数据行数 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2019-05-28 14:40:43 <br/> * * @param wb * 入参|工作簿| {@link org.apache.poi.ss.usermodel.Workbook} * @param rows * 出参|行数|int * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "工作簿数据行数", style = "判断型", type = "同步组件", version = "1.0.0", deprecated = false, author = "admin", date = "2019-05-28 02:40:43") @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 = "成功") }) public static ResultBase A_bookRows(Workbook wb) { int rows = 0; if (wb != null) { Iterator<Sheet> it = wb.sheetIterator(); while (it.hasNext()) { rows += it.next().getLastRowNum() + 1; } } return ResultBase.newSuccessResult(rows); } 交易中组件使用方式: ![](https://img.kancloud.cn/35/f4/35f410055ec2fc1633fa2bb5ab5bcd01_950x750.jpg) ## 参数说明及示例 工作簿:需要获取总行数的工作簿,可以是其他技术组件传递过来的工作簿,示例: `__INNER__["wb"]` 行数:当前工作簿的总行数,示例: `__INNER__["count"]` > 获取当前工作簿行数