private static CellRangeAddress mergeRegion(Doc doc) {
		String attr[][] = doc.getAttr();
		Td td = (Td) doc;
		CellRangeAddress cra = null;
		int rowspan = 0;
		int colspan = 0;

		for (int x = 0; x < attr.length; x++) {
			if ("rowspan".equals(attr[x][0]) && (!"".equals(attr[x][1]))) {
				rowspan = Integer.parseInt(attr[x][1]);

			} else if ("colspan".equals(attr[x][0]) && (!"".equals(attr[x][1]))) {
				colspan = Integer.parseInt(attr[x][1]);
			}

		}

		if (rowspan >= 2 && colspan >= 2) {
			cra = new CellRangeAddress(td.getAddress()[0], td.getAddress()[0]
					+ rowspan - 1, td.getAddress()[1], td.getAddress()[1]
					+ colspan - 1);

		} else if (rowspan >= 2) {
			cra = new CellRangeAddress(td.getAddress()[0], td.getAddress()[0]
					+ rowspan - 1, td.getAddress()[1], td.getAddress()[1]);
		} else if (colspan >= 2) {
			cra = new CellRangeAddress(td.getAddress()[0], td.getAddress()[0],
					td.getAddress()[1], td.getAddress()[1] + colspan - 1);
		}

		return cra;
	}