-
Type:
New Feature
-
Resolution: Done
-
Priority:
Normal
-
Affects Version/s: 3.8.1
-
Component/s: None
-
Security Level: Jimmy
-
None
Users wants to know the last column that contains data in a sheet.
Like http://www.zkoss.org/javadoc/latest/zss/org/zkoss/zss/api/model/Sheet.html#getLastRow--
workaround
public void findLastDataRowCol() { lastRowIndex = sheet.getLastRow(); Iterator iterator = sheet.getInternalSheet().getRowIterator(); for (SRow srow : iterator) { int currentLastColumn = sheet.getLastColumn(srow.getIndex()); if (currentLastColumn > lastColumnIndex) { lastColumnIndex = currentLastColumn; } } }