src/org/tiefaces/components/websheet/utility/CellStyleUtility.java
private static short getDecimalPlacesFromFormat(final Cell cell) {
		CellStyle style = cell.getCellStyle();
		if (style == null) {
			return 0;
		}
		String formatString = style.getDataFormatString();
		if (formatString == null) {
			return 0;
		}
		int ipos = formatString.indexOf('.');
		if (ipos < 0) {
			return 0;
		}
		short counter = 0;
		for (int i = ipos + 1; i < formatString.length(); i++) {
			if (formatString.charAt(i) == '0') {
				counter++;
			} else {
				break;
			}
		}
		return counter;
	}
private static short getDecimalPlacesFromFormat(final Cell cell) {
		CellStyle style = cell.getCellStyle();
		if (style == null) {
			return 0;
		}
		String formatString = style.getDataFormatString();
		if (formatString == null) {
			return 0;
		}
		int ipos = formatString.indexOf('.');
		if (ipos < 0) {
			return 0;
		}
		short counter = 0;
		for (int i = ipos + 1; i < formatString.length(); i++) {
			if (formatString.charAt(i) == '0') {
				counter++;
			} else {
				break;
			}
		}
		return counter;
	}
private static short getDecimalPlacesFromFormat ( final Cell cell ) { CellStyle style = cell . getCellStyle ( ) ; if ( style == null ) { return 0 ; } String formatString = style . getDataFormatString ( ) ; if ( formatString == null ) { return 0 ; } int ipos = formatString . indexOf ( ' ' ) ; if ( ipos < 0 ) { return 0 ; } short counter = 0 ; for ( int i = ipos + 1 ; i < formatString . length ( ) ; i ++ ) { if ( formatString . charAt ( i ) == ' ' ) { counter ++ ; } else { break ; } } return counter ; }
get decimal places from format string e.g. 0.00 will return 2

@param cell
the cell
@return decimal places of the formatted string
get decimal places from format string e . g . 0 . 00 will return 2