public static HSSFWorkbook html2Excel(HSSFWorkbook wb, Html html, int i)
			throws Exception {

		HSSFSheet sheet = wb.createSheet(html.getHead().getTitle().getElementText());

		// sheet.setColumnWidth(5,14*36);
		Style htmlStyle = html.getHead().getStyle();
		Table htmlTable = html.getBody().getTable();
		List<CellRangeAddress> cras = new ArrayList<CellRangeAddress>();

		for (int row = 0; row < htmlTable.getTrlist().size(); row++) {
			Tr tr = htmlTable.getTrlist().get(row);
			// String[][] trattr = tr.getAttr();
			HSSFRow hssfrow = sheet.createRow(row + ROW_OFFSET);
			for (int col = 0; col < tr.getTdlist().size(); col++) {
				Td td = tr.getTdlist().get(col);
				if (td.getAddress() != null) {
					int[] address = new int[2];
					address[0] = td.getAddress()[0] + ROW_OFFSET;
					address[1] = td.getAddress()[1] + COL_OFFSET;
					td.setAddress(address);
				}

				/**
				 * 检查是否有单元格，若有就进行合并
				 */
				CellRangeAddress cra = mergeRegion(td);
				if (cra != null) {
					cras.add(cra);
				}

				if (td.getElementName() != null) {
					HSSFCellStyle cellStyle = wb.createCellStyle();
					HSSFCell hssfcell = hssfrow.createCell(col + COL_OFFSET);
					hssfcell.setCellValue(td.getElementText());
					HSSFCellStyle defaultStyle = StyleUtil.getDefaultStyle(wb,
							cellStyle);
					cellStyle = StyleUtil.getStyle(wb, defaultStyle, htmlStyle,
							td.getAttr());
					StyleUtil
							.setColumnAndRowHW(hssfrow, hssfcell, td.getAttr());
					if (cellStyle != null) {

						hssfcell.setCellStyle(cellStyle);

					} else {
						hssfcell.setCellStyle(defaultStyle);

					}

				}

			}
		}

		for (int cranum = 0; cranum < cras.size(); cranum++) {
			sheet.addMergedRegion(cras.get(cranum));
			StyleUtil.setRegionStyle(sheet, cras.get(cranum));
		}
		sheet = null;
		return wb;
	}