<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 27,comments - 2,trackbacks - 0
    簡單的代碼:
    public static void main(String[] args) {
    try {
    File allfile = new File("f:\\excel\\total.xlsx");
    File file2 = new File("f:\\excel\\xxxxxx.xlsx");
    XSSFWorkbook h = new XSSFWorkbook(new FileInputStream(allfile));
    XSSFSheet x = h.getSheetAt(0);
    XSSFWorkbook hssfWorkbook = new XSSFWorkbook(new FileInputStream(file2));
    XSSFSheet hssfSheet = hssfWorkbook.getSheetAt(0);
    int ii = hssfSheet.getLastRowNum();//讀取的表格行數
    System.out.println(ii);
    FileOutputStream out_ = new FileOutputStream(allfile);
    for (int i = 0; i < ii; i++) {
    XSSFRow lastRow = x.createRow(x.getLastRowNum()+1);
    XSSFRow xssfRow = hssfSheet.getRow(i);
    XSSFCell xssfCell0 = xssfRow.getCell(0);
    CellStyle cellStyle0 = xssfCell0.getCellStyle();
    CellStyle newStyle0 = h.createCellStyle();
    newStyle0.cloneStyleFrom(cellStyle0);
    XSSFCell xssfCell0_ = lastRow.createCell(0);
    xssfCell0_.setCellStyle(newStyle0);
    xssfCell0_.setCellValue(xssfCell0.toString());
    XSSFCell xssfCell1 = xssfRow.getCell(1);
    CellStyle cellStyle1 = xssfCell1.getCellStyle();
    CellStyle newStyle1 = h.createCellStyle();
    newStyle1.cloneStyleFrom(cellStyle1);
    XSSFCell xssfCell1_ = lastRow.createCell(1);
    xssfCell1_.setCellStyle(newStyle1);
    xssfCell1_.setCellValue(xssfCell1.toString());
    XSSFCell xssfCell2 = xssfRow.getCell(2);
    CellStyle cellStyle2 = xssfCell2.getCellStyle();
    CellStyle newStyle2 = h.createCellStyle();
    newStyle2.cloneStyleFrom(cellStyle2);
    XSSFCell xssfCell2_ = lastRow.createCell(2);
    xssfCell2_.setCellStyle(newStyle2);
    xssfCell2_.setCellValue(xssfCell2.toString());
    XSSFCell xssfCell3 = xssfRow.getCell(3);
    CellStyle cellStyle3 = xssfCell3.getCellStyle();
    CellStyle newStyle3 = h.createCellStyle();
    newStyle3.cloneStyleFrom(cellStyle3);
    XSSFCell xssfCell3_ = lastRow.createCell(3);
    xssfCell3_.setCellStyle(newStyle3);
    xssfCell3_.setCellValue(xssfCell3.toString());
    XSSFCell xssfCell4 = xssfRow.getCell(4);
    CellStyle cellStyle4 = xssfCell4.getCellStyle();
    CellStyle newStyle4 = h.createCellStyle();
    newStyle4.cloneStyleFrom(cellStyle4);
    XSSFCell xssfCell4_ = lastRow.createCell(4);
    xssfCell4_.setCellStyle(newStyle4);
    xssfCell4_.setCellValue(xssfCell4.toString().toString());
    }
    h.write(out_);
    out_.flush();
    out_.close();
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    }
    posted on 2013-07-19 18:02 魏文甫 閱讀(634) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 久久久久久亚洲精品成人| 免费鲁丝片一级观看| 伊人久久精品亚洲午夜| 农村寡妇一级毛片免费看视频| 国产高清免费在线| 青草久久精品亚洲综合专区| 天天干在线免费视频| 亚洲七久久之综合七久久| 岛国av无码免费无禁网站| 亚洲精品国产综合久久久久紧| 香蕉视频在线观看免费国产婷婷| 亚洲精品无播放器在线播放| 可以免费观看一级毛片黄a| 精品女同一区二区三区免费播放 | 学生妹亚洲一区二区| 成人毛片18女人毛片免费| 午夜亚洲WWW湿好爽| 亚洲国产精品碰碰| 三级黄色免费观看| 老司机亚洲精品影院无码| 中文字幕无码不卡免费视频| 国产午夜亚洲精品不卡| 久久激情亚洲精品无码?V | 在线看片无码永久免费视频| 亚洲综合校园春色| 免费国产美女爽到喷出水来视频| 精品一区二区三区免费视频 | 亚洲黄色在线观看网站| 一二三四免费观看在线电影 | 中文字幕久无码免费久久| 久久夜色精品国产噜噜噜亚洲AV| 中文字幕无码不卡免费视频| 人妻免费久久久久久久了| 亚洲av激情无码专区在线播放| 毛片高清视频在线看免费观看| 无套内射无矿码免费看黄| 亚洲国产精品第一区二区| 麻豆成人精品国产免费| 中文字幕永久免费| 国产成人精品日本亚洲专一区| 亚洲精品成人网久久久久久|