<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无码乱码在线观看性色扶| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 亚洲人成人网站色www| 丁香花在线视频观看免费| 久久99国产亚洲高清观看首页| 国色精品va在线观看免费视频| 亚洲日本va午夜中文字幕一区| 最近中文字幕无免费| 亚洲国产精品综合久久网络| 日韩a毛片免费观看| 亚洲人成网亚洲欧洲无码久久| 成人性生交大片免费看中文| 亚洲综合国产精品| 久久精品a一国产成人免费网站| 欧洲亚洲国产精华液| 成人午夜亚洲精品无码网站| 在线人成免费视频69国产| 亚洲AV一二三区成人影片| 久久精品国产影库免费看| 亚洲综合久久成人69| 国产精品免费看久久久久| 中国性猛交xxxxx免费看| 亚洲成人在线电影| 国产拍拍拍无码视频免费| 亚洲国产日韩女人aaaaaa毛片在线| 大学生美女毛片免费视频| 中文在线观看永久免费| 亚洲一本之道高清乱码| 亚洲综合色成在线播放| 久久精品免费一区二区| 特色特黄a毛片高清免费观看|