IDispatch row = (IDispatch)cursheet.get("Rows");
int rows = Integer.parseInt(row.get("Count").toString());
(14)获得工作表里面的所有列总数(256列)
IDispatch col = (IDispatch)sheet.get("Columns");
int cols = Integer.parseInt(col.get("Count").toString());
(15)获得工作表里面可视的所有行总数
IDispatch row = (IDispatch) ((IDispatch)cursheet.get("UsedRange")).get("Rows");
int rows = Integer.parseInt(row.get("Count").toString());
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/