try {
// byte[] html = doc.toString().getBytes("utf-8");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
// DocumentConverter.convert(doc.toString().getBytes("utf-8"), "html", bos, "xls");
Workbook wb = WorkbookFactory.create(new ByteArrayInputStream(bos.toByteArray()));
Elements tableElements = doc.select("table");
for(int i=0;i<tableElements.size();i++){
Element table = tableElements.get(i);
if(table.hasAttr("title")){
if(wb.getNumberOfSheets()>i){
wb.setSheetName(i, table.attr("title"));