src/sap.ui.table/src/sap/ui/table/TableUtils.js
function(oTable) {

			if (oTable._iHeaderRowCount === undefined) {
				if (!oTable.getColumnHeaderVisible()) {
					oTable._iHeaderRowCount = 0;
				} else {
					var iHeaderRows = 1;
					var aColumns = oTable.getColumns();
					for (var i = 0; i < aColumns.length; i++) {
						if (aColumns[i].shouldRender()) {
							// only visible columns need to be considered. We don't invoke getVisibleColumns due to
							// performance considerations. With several dozens of columns, it's quite costy to loop them twice.
							iHeaderRows = Math.max(iHeaderRows, aColumns[i].getMultiLabels().length);
						}
					}
					oTable._iHeaderRowCount = iHeaderRows;
				}
			}
			return oTable._iHeaderRowCount;
		}
function(oTable) {

			if (oTable._iHeaderRowCount === undefined) {
				if (!oTable.getColumnHeaderVisible()) {
					oTable._iHeaderRowCount = 0;
				} else {
					var iHeaderRows = 1;
					var aColumns = oTable.getColumns();
					for (var i = 0; i < aColumns.length; i++) {
						if (aColumns[i].shouldRender()) {
							// only visible columns need to be considered. We don't invoke getVisibleColumns due to
							// performance considerations. With several dozens of columns, it's quite costy to loop them twice.
							iHeaderRows = Math.max(iHeaderRows, aColumns[i].getMultiLabels().length);
						}
					}
					oTable._iHeaderRowCount = iHeaderRows;
				}
			}
			return oTable._iHeaderRowCount;
		}
function ( oTable ) { if ( oTable . _iHeaderRowCount === undefined ) { if ( ! oTable . getColumnHeaderVisible ( ) ) { oTable . _iHeaderRowCount = 0 ; } else { var iHeaderRows = 1 ; var aColumns = oTable . getColumns ( ) ; for ( var i = 0 ; i < aColumns . length ; i ++ ) { if ( aColumns [ i ] . shouldRender ( ) ) { // only visible columns need to be considered. We don't invoke getVisibleColumns due to // performance considerations. With several dozens of columns, it's quite costy to loop them twice. iHeaderRows = Math . max ( iHeaderRows , aColumns [ i ] . getMultiLabels ( ) . length ) ; } } oTable . _iHeaderRowCount = iHeaderRows ; } } return oTable . _iHeaderRowCount ; }
Returns the number of header rows.

@param {sap.ui.table.Table} oTable Instance of the table.
@returns {int} The number of rows in the table header.
Returns the number of header rows .