<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> 工作簿寫文件 <br/> * <b>創建者:</b> admin <br/> * <b>創建時間:</b> 2019-07-18 16:41:30 <br/> * * @param filepath * 入參|文件名稱|{@link java.lang.String} * @param wb * 入參|work|{@link org.apache.poi.xssf.streaming.SXSSFWorkbook} * @param filename * 出參|文件名|{@link java.lang.String} * @return 0 失敗<br/> * 1 成功<br/> */ @Component(label = "工作簿寫文件", style = "判斷型", type = "同步組件", comment = "根據文件名稱獲取工作簿", version = "1.0.0", deprecated = false, author = "admin", date = "2019-07-18 04:41:30") @InParams(param = { @Param(name = "filepath", comment = "文件名稱", type = java.lang.String.class), @Param(name = "wb", comment = "work", type = org.apache.poi.xssf.streaming.SXSSFWorkbook.class) }) @OutParams(param = { @Param(name = "filename", comment = "文件名", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "0", desp = "失敗"), @Return(id = "1", desp = "成功") }) public static ResultBase A_writerWorkbook(String filepath, SXSSFWorkbook wb) { FileOutputStream out = null; try { if (filepath.endsWith(".xls")) { filepath += "x"; } File file = new File(filepath); if (!file.exists()) { file.createNewFile(); } out = new FileOutputStream(filepath, false); wb.write(out); wb.dispose(); AppLog.info("寫文件,size={},name={}", file.length(), file.getName()); return ResultBase.newSuccessResult(file.getName()); } catch (Exception e) { AppLog.error("寫工作簿異常", e); return ResultBase.newFailureResult("999", "寫文件工作簿異常:[" + filepath + "]" + AppLog.errorMsg(e)); } finally { try { wb.close(); if (out != null) out.close(); } catch (IOException e) { e.printStackTrace(); } } } 交易中組件使用方式: ![](https://img.kancloud.cn/71/e4/71e48457903f044d8d08f4b6ee177b1c_950x750.jpg) ## 參數說明及示例 文件名稱:Excel文件全路徑,示例: `__INNER__["file"]`或者`"/home/usr/local/test.xls"` work:需要寫進去的工作簿,可以是其他技術組件獲取的或者生成的工作簿,示例: `__INNER__["workBook"]` 文件名:返回Excel文件名,示例: `__INNER__["fileName"]` > 將工作簿寫進文件里面
                  <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>

                              哎呀哎呀视频在线观看