// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); CheckBoxCellType cellType = new CheckBoxCellType(); cellType.setCaption("Caption"); cellType.setTextTrue("True"); cellType.setTextFalse("False"); cellType.setTextIndeterminate("Indeterminate"); cellType.setIsThreeState(true); cellType.setTextAlign(CheckBoxAlign.Right); worksheet.getRange("C5:C6").setCellType(cellType); worksheet.getRange("C5").setValue(true); worksheet.getRange("C6").setValue(false); // Save to a pdf file workbook.save("AddCheckBoxCellType.pdf");