src/org/tiefaces/components/websheet/utility/WebSheetUtility.java
public static int getSheetRightCol(final Sheet sheet) {

		try {
			if (sheet instanceof XSSFSheet) {
				XSSFSheet xsheet = (XSSFSheet) sheet;
				int rightCol = getSheetRightColFromDimension(xsheet);
				if (rightCol > TieConstants.MAX_COLUMNS_IN_SHEET) {
					clearHiddenColumns(sheet);
					rightCol = getSheetRightColFromDimension(xsheet);
				}
				return rightCol;

			}
		} catch (Exception e) {
			LOG.log(Level.SEVERE, "error in getSheetRightCol : "
					+ e.getLocalizedMessage(), e);
		}
		return -1;
	}
public static int getSheetRightCol(final Sheet sheet) {

		try {
			if (sheet instanceof XSSFSheet) {
				XSSFSheet xsheet = (XSSFSheet) sheet;
				int rightCol = getSheetRightColFromDimension(xsheet);
				if (rightCol > TieConstants.MAX_COLUMNS_IN_SHEET) {
					clearHiddenColumns(sheet);
					rightCol = getSheetRightColFromDimension(xsheet);
				}
				return rightCol;

			}
		} catch (Exception e) {
			LOG.log(Level.SEVERE, "error in getSheetRightCol : "
					+ e.getLocalizedMessage(), e);
		}
		return -1;
	}
public static int getSheetRightCol ( final Sheet sheet ) { try { if ( sheet instanceof XSSFSheet ) { XSSFSheet xsheet = ( XSSFSheet ) sheet ; int rightCol = getSheetRightColFromDimension ( xsheet ) ; if ( rightCol > TieConstants . MAX_COLUMNS_IN_SHEET ) { clearHiddenColumns ( sheet ) ; rightCol = getSheetRightColFromDimension ( xsheet ) ; } return rightCol ; } } catch ( Exception e ) { LOG . log ( Level . SEVERE , "error in getSheetRightCol : " + e . getLocalizedMessage ( ) , e ) ; } return - 1 ; }
return the last column of the sheet.

@param sheet
sheet.
@return last column number (A column will return 0).
return the last column of the sheet .