<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 組件源碼 /** * <b>方法描述:</b> 取Excel單元格 <br/> * <b>創建者:</b> admin <br/> * <b>創建時間:</b> 2018-05-08 17:13:55 <br/> * * @param workBook * 入參|Excel表格對象|{@link Object} * @param sheet * 入參|Excel工作簿|{@link java.lang.String} * @param row * 入參|行坐標|{@link int} * @param col * 入參|列坐標|{@link int} * @param celldata * 出參|單元格數據|{@link java.lang.String} * @return -1 異常<br/> * 0 失敗<br/> * 1 成功<br/> */ @Component(label = "取Excel單元格", style = "判斷型", type = "同步組件", comment = "獲取Excel單元格數據", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-08 05:13:55") @InParams(param = { @Param(name = "workBook", comment = "Excel表格對象", type = Object.class), @Param(name = "sheet", comment = "Excel工作簿", type = java.lang.String.class), @Param(name = "row", comment = "行坐標", type = int.class), @Param(name = "col", comment = "列坐標", type = int.class) }) @OutParams(param = { @Param(name = "celldata", comment = "單元格數據", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "-1", desp = "異常"), @Return(id = "0", desp = "失敗"), @Return(id = "1", desp = "成功") }) public static ResultBase P_xlsGetCellData(Object workBook, String sheet, int row, int col) { if (workBook == null || !(workBook instanceof Workbook)) { return ResultBase.newFailureResult("TPTF0008", "輸入Excel對象不正確,不是Workbook 對象"); } Workbook xlsObj = (Workbook) workBook; int nSheet = -1; try { nSheet = Integer.parseInt(sheet); } catch (Exception ex) { AppLog.info("組件 輸入參數sheet 不是數字,按照名稱進行獲取"); // return ResultBase.newExceptionResult("TPTF0009", "類型轉換錯誤:" + ex); } Sheet sheetObj = ((nSheet > -1) ? xlsObj.getSheetAt(nSheet) : xlsObj .getSheet(sheet)); if (sheetObj == null) { return ResultBase.newFailureResult("TPTF0010", "找不到指定的工作簿:sheet=" + sheet); } try { Row rowObj = sheetObj.getRow(row); if (rowObj == null) return ResultBase.newFailureResult("TPTF0011", "沒有指定行記錄,行坐標:" + row); int cols = rowObj.getPhysicalNumberOfCells(); if (col > cols) { return ResultBase.newFailureResult("TPTF0011", "沒有指定列記錄:列坐標超出行列數:列=" + col + ",總列數=" + cols); } return ResultBase.newSuccessResult(getCellFormatValue(rowObj .getCell(col))); } catch (Exception e) { AppLog.error(e); return ResultBase.newExceptionResult("TPTF0012", "獲取單元格對象異常:" + AppLog.errorMsg(e)); } } 交易中組件使用方式: ![](https://img.kancloud.cn/34/12/34122b53ae857d87b575dc7448f21d08_950x750.jpg) ## 參數說明及示例 Excel表格對象:Excel對象,可以由其他技術組件傳遞,示例: `__INNER__["wb"]` Excel工作簿:sheet名稱或者索引,示例: `"sheet1"` 行坐標:指定單元格所在行,示例: `3` 列坐標:指定單元格所在列,示例: `5` 單元格數據:返回指定單元格數據對象,示例: `__INNER__["data"]` > 獲取Excel單元格數據
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看