//外部表格循环
while (tab.hasNext()){
Table table = tab.next();
System.out.println("第\t"+(pivot+1)+"\t个表");
//pivot==0表示第一个表
if (pivot==0){
//获取第一行第一列,需要获取这个单元格内的table
TableCell firstCellIn0 = table.getRow(0).getCell(0);
//获取范围(第一行第一列)内的table
TableIterator iterator=new TableIterator(firstCellIn0);
while (iterator.hasNext()){
Table innerTab = iterator.next();
System.out.println("内部表行数="+innerTab.numRows());
for (int i = 0; i < innerTab.numRows(); i++) {
TableRow oneRow = innerTab.getRow(i);
for (int j = 0; j < oneRow.numCells(); j++) {
TableCell oneCell = oneRow.getCell(j);
System.out.print(oneCell.text()+"\t");
}
}
}
}
pivot++;
}