1、引入org.apache.poi
2、获得指定sheet,再获得指定row
3、最后使用.getPhysicalNumberOfCells()返回不包含空列的列数,或使用getLastCellNum()返回包含空列的列数。