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

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


    網站導航:
     
    主站蜘蛛池模板: 亚洲高清在线观看| 国产亚洲精品精品国产亚洲综合| 亚洲av无码乱码国产精品| 午夜成人无码福利免费视频| 成在线人永久免费视频播放| 91丁香亚洲综合社区| 国产精彩免费视频| 亚洲不卡在线观看| 成人免费视频小说| mm1313亚洲国产精品无码试看 | 日韩免费在线观看视频| 亚洲色欲久久久综合网| a国产成人免费视频| 亚洲精品视频在线| 成人福利免费视频| 亚洲av无码专区首页| 亚洲AV无码乱码在线观看性色扶| 午夜成人无码福利免费视频| 久久久久久久尹人综合网亚洲| 一级毛片**不卡免费播| 亚洲成人高清在线观看| 青青青国产免费一夜七次郎| 欧洲精品码一区二区三区免费看| 亚洲美女在线国产| 日韩免费无码一区二区三区| 亚洲一区中文字幕在线电影网 | 99久久国产热无码精品免费| 亚洲成a∧人片在线观看无码| 亚洲精品无码你懂的网站| 大地资源网高清在线观看免费| 亚洲女人初试黑人巨高清| 日本免费福利视频| 三级黄色片免费看| 亚洲18在线天美| 亚洲精品国产高清嫩草影院| 日本免费一区二区三区| 亚洲乱理伦片在线观看中字| 国产美女亚洲精品久久久综合| 日本高清在线免费| 人妻无码中文字幕免费视频蜜桃| 亚洲国产a∨无码中文777|