// Create a new workbook Workbook workbook = new Workbook(); //Use sheet index to get worksheet. IWorksheet worksheet = workbook.getWorksheets().get(0); // freeze pane worksheet.freezePanes(5, 5); // Set frozen line color as dark blue. worksheet.setFrozenLineColor(Color.GetDarkBlue());