@SuppressWarnings("deprecation")public static void excel(String xlsFile, String outXlsFile, TOrderExcel Tore, int rows) throwsFileNotFoundException, IOException {int i = 0;
ArrayList arr = new ArrayList();
String filename=xlsFile;
XSSFWorkbook workbook= new XSSFWorkbook(newFileInputStream(filename));
XSSFSheet sheet = workbook.getSheetAt(0);
XSSFRow row= null, row1 = null;
XSSFCell cell, cell1;
// 读取模版for (int icount = 1; icount < 38; icount++) {
row=sheet.getRow(icount);
cell= row.getCell((short) 2);
System.out.println(cell);for (int j = 1; j < 10; j++) {
cell1= row.getCell((short) 1);
System.out.println(cell1);if(cell.toString().equals(cell1.toString())) {
getCell(row,3).setCellValue(cell1.toString());
}if (icount==2 && j==3) {if (!Utility.isEmpty(Tore.getName())) {
getCell(row, j).setCellValue(Tore.getName());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==2 && j==5) {if (!Utility.isEmpty(Tore.getSex())) {
getCell(row, j).setCellValue(Tore.getSex());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==2 && j==7) {if (!Utility.isEmpty(Tore.getBrithday()+"")) {
getCell(row, j).setCellValue(new SimpleDateFormat("yyyy-MM-dd").format(Tore.getBrithday()));
}else{
getCell(row, j).setCellValue("");
}
}if (icount==2 && j==9) {if (!Utility.isEmpty(Tore.getAaddress())) {
getCell(row, j).setCellValue(Tore.getAcity());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==3 && j==3) {if (!Utility.isEmpty(Tore.getEdu())) {
System.out.println(getCell(row,2).getRichStringCellValue());
getCell(row, j).setCellValue(Tore.getEdu());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==3 && j==5) {if (!Utility.isEmpty(Tore.getMarry())) {
getCell(row, j).setCellValue(Tore.getMarry());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==3 && j==7) {if (!Utility.isEmpty(Tore.getHmarry())) {
getCell(row, j).setCellValue(Tore.getHmarry());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==3 && j==9) {if (!Utility.isEmpty(Tore.getIndustry())) {
getCell(row, j).setCellValue(Tore.getIndustry());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==4 && j==3) {if (!Utility.isEmpty(Tore.getCredit_industry())) {
getCell(row, j).setCellValue(Tore.getCredit_industry());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==5 && j==3) {if (!Utility.isEmpty(Tore.getXaddress())) {
getCell(row, j).setCellValue(Tore.getXprovince()+Tore.getXcity()+Tore.getXarea()+Tore.getXaddress());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==6 && j==3) {if (!Utility.isEmpty(Tore.getPro_type())) {
String protype= "";if ("1".equals(Tore.getPro_type()))
protype= "一抵";elseprotype= "二抵";
getCell(row, j).setCellValue(protype);
}else{
getCell(row, j).setCellValue("");
}
}if (icount==6 && j==5) {if (!Utility.isEmpty(Tore.getHaddress())) {
getCell(row, j).setCellValue(Tore.getHprovince()+Tore.getHcity()+Tore.getHarea()+Tore.getHaddress());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==7 && j==3) {if (!Utility.isEmpty(Tore.getBuildyear())) {
getCell(row, j).setCellValue(Tore.getBuildyear()+"年");
}else{
getCell(row, j).setCellValue("");
}
}if (icount==7 && j==5) {if (!Utility.isEmpty(Tore.getNums_floor()+"")) {
getCell(row, j).setCellValue(Tore.getNums_floor());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==7 && j==7) {if (!Utility.isEmpty(Tore.getFloor()+"")) {
getCell(row, j).setCellValue(Tore.getFloor());
}else{
getCell(row, j).setCellValue("");
}
}if (icount==7 && j==9) {if (!Utility.isEmpty(Tore.getBuildarea()+"")) {
getCell(row, j).setCellValue(Tore.getBuildarea()+"平方米");
}else{
getCell(row, j).setCellValue("");
}
}if (icount==8 && j==3) {if (!Utility.isEmpty(Tore.getMoney()+"")) {
getCell(row, j).setCellValue(Tore.getMoney()+"万元");