Package cn.baiweigang.qtaf.toolkit.util

Examples of cn.baiweigang.qtaf.toolkit.util.ExcelUtil


//       
//      }
//      log.error("sheetname--"+sheetName);
//      log.error("excelName--"+excelName);
//      log.error("excelreportpath--"+excelreportpath);
      ExcelUtil excel = new ExcelUtil()
      String pathName=excelreportpath+"/"+excelName+".xlsx";
     
      if (!FileUtil.isEmeyxist(pathName)) {//不存在时,新建空白工作簿
        excel.createBlankExcel2007(pathName);
      }
     
      //读取Excel文件
      excel.setPathName(pathName);
      XSSFWorkbook wb=(XSSFWorkbook) excel.getWb();
      updateWbFromContent(wb,title,datas,sheetName);//测试结果写入工作簿
      excel.writeExcel2007(wb, pathName);//写入文件
    }
View Full Code Here


   * 构造函数
   * @param pathName
   * @param sheetName
   */
  public ReadCaseFromExcel(String pathName,String sheetName){
    excel=new ExcelUtil(pathName, sheetName);
  }
View Full Code Here

  /**
   * 构造函数
   * @param pathName
   */
  public ReadCaseFromExcel(String pathName){
    excel=new ExcelUtil(pathName, 0);
  }
View Full Code Here

   * 构造函数
   * @param pathName
   * @param sheetName
   */
  public ReadCaseFromExcel(String pathName,String sheetName){
    excel=new ExcelUtil(pathName, sheetName);
  }
View Full Code Here

  /**
   * 构造函数
   * @param pathName
   */
  public ReadCaseFromExcel(String pathName){
    excel=new ExcelUtil(pathName, 0);
  }
View Full Code Here

//       
//      }
//      log.error("sheetname--"+sheetName);
//      log.error("excelName--"+excelName);
//      log.error("excelreportpath--"+excelreportpath);
      ExcelUtil excel = new ExcelUtil()
      String pathName=excelreportpath+"/"+excelName+".xlsx";
     
      if (!FileUtil.isExist(pathName)) {//不存在时,新建空白工作簿
        excel.createBlankExcel2007(pathName);
      }
     
      //读取Excel文件
      excel.setPathName(pathName);
      XSSFWorkbook wb=(XSSFWorkbook) excel.getWb();
      updateWbFromContent(wb,title,datas,sheetName);//测试结果写入工作簿
      excel.writeExcel2007(wb, pathName);//写入文件
    }
View Full Code Here

    return content;
  }

  //Excel报告格式定义
  private void writeExcel(List<String> title,List<String[]> datas,String sheetName,String excelName,String excelreportpath){
      ExcelUtil excel = new ExcelUtil()
      String pathName=excelreportpath+"/"+excelName+".xlsx";
     
      if (!FileUtil.isEmeyxist(pathName)) {//不存在时,新建空白工作簿
        excel.createBlankExcel2007(pathName);
      }
     
      //读取Excel文件
      excel.setPathName(pathName);
      XSSFWorkbook wb=(XSSFWorkbook) excel.getWb();
      updateWbFromContent(wb,title,datas,sheetName);//测试结果写入工作簿
      excel.writeExcel2007(wb, pathName);//写入文件
    }
View Full Code Here

TOP

Related Classes of cn.baiweigang.qtaf.toolkit.util.ExcelUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.