private void loadHeaderRows ( final SheetConfiguration sheetConfig , final Map < String , CellRangeAddress > cellRangeMap , final List < String > skippedRegionCells ) { int top = sheetConfig . getHeaderCellRange ( ) . getTopRow ( ) ; int bottom = sheetConfig . getHeaderCellRange ( ) . getBottomRow ( ) ; int left = sheetConfig . getHeaderCellRange ( ) . getLeftCol ( ) ; int right = sheetConfig . getHeaderCellRange ( ) . getRightCol ( ) ; String sheetName = sheetConfig . getSheetName ( ) ; Sheet sheet1 = parent . getWb ( ) . getSheet ( sheetName ) ; int totalWidth = CellStyleUtility . calcTotalWidth ( sheet1 , left , right , WebSheetUtility . pixel2WidthUnits ( parent . getLineNumberColumnWidth ( ) + parent . getAddRowColumnWidth ( ) ) ) ; RangeBuildRef rangeBuildRef = new RangeBuildRef ( left , right , totalWidth , sheet1 ) ; if ( sheetConfig . isFixedWidthStyle ( ) ) { parent . setTableWidthStyle ( "table-layout: fixed; width:" + WebSheetUtility . widthUnits2Pixel ( totalWidth ) + "px;" ) ; } parent . setLineNumberColumnWidthStyle ( getWidthStyle ( WebSheetUtility . pixel2WidthUnits ( parent . getLineNumberColumnWidth ( ) ) , totalWidth ) ) ; parent . setAddRowColumnWidthStyle ( "width:" + parent . getAddRowColumnWidth ( ) + "px;" ) ; parent . getHeaderRows ( ) . clear ( ) ; if ( top < 0 ) { // this is blank configuration. set column letter as header parent . getHeaderRows ( ) . add ( loadHeaderRowWithoutConfigurationTab ( rangeBuildRef , true ) ) ; // set showlinenumber to true as default parent . setShowLineNumber ( true ) ; } else { parent . getHeaderRows ( ) . add ( loadHeaderRowWithoutConfigurationTab ( rangeBuildRef , false ) ) ; for ( int i = top ; i <= bottom ; i ++ ) { parent . getHeaderRows ( ) . add ( loadHeaderRowWithConfigurationTab ( sheetConfig , rangeBuildRef , i , cellRangeMap , skippedRegionCells ) ) ; } // set showlinenumber to false as default parent . setShowLineNumber ( false ) ; } }
Load header rows .