// Create a new workbook Workbook workbook = new Workbook(); //Use sheet index to get worksheet. IWorksheet worksheet = workbook.getWorksheets().get(0); // freeze pane worksheet.freezePanes(2, 2); // freeze trailing pane worksheet.freezeTrailingPanes(2, 3);