<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 魏文甫 閱讀(635) 評論(0)  編輯  收藏

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


    網站導航:
     
    主站蜘蛛池模板: 国产片免费在线观看| 亚洲jizzjizz在线播放久| 国产国产人免费人成免费视频| 国产精品免费一区二区三区四区| 亚洲AV无码一区二区三区网址| 91情国产l精品国产亚洲区| 自拍偷自拍亚洲精品被多人伦好爽| 全免费a级毛片免费看不卡 | 国产一区二区免费在线| 免费电影在线观看网站| 一区二区三区四区免费视频| 国产va免费精品| 四虎精品免费永久免费视频| 风间由美在线亚洲一区| 国产精品高清视亚洲一区二区| 久久亚洲sm情趣捆绑调教| 亚洲成AV人片一区二区密柚| 久久精品国产亚洲Aⅴ香蕉| 亚洲 无码 在线 专区| 国产午夜鲁丝片AV无码免费| 免费无码A片一区二三区| 欧美男同gv免费网站观看| 免费专区丝袜脚调教视频| 亚欧免费视频一区二区三区 | 在线亚洲午夜理论AV大片| www国产亚洲精品久久久| 四虎永久成人免费| 日本大片在线看黄a∨免费| 成年私人影院免费视频网站| 久久久www成人免费毛片| 中国在线观看免费国语版| 国产啪精品视频网免费| 成人免费毛片内射美女-百度| 国产成人精品免费视频大| 久久久久久精品成人免费图片| 91大神免费观看| 在线v片免费观看视频| 免费理论片51人人看电影| 国产成人免费网站在线观看| 国产成人精品免费视频大全五级| 亚洲av无码成人精品区|