//create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); ButtonCellType buttonCellType = new ButtonCellType(); buttonCellType.setText("Button"); buttonCellType.setButtonBackColor("Azure"); buttonCellType.setMarginLeft(10); buttonCellType.setMarginRight(10); worksheet.setCellType(buttonCellType);
//create a new workbook var workbook = Workbook() val worksheet = workbook.worksheets.get(0) val buttonCellType = ButtonCellType() buttonCellType.setText("Button") buttonCellType.setButtonBackColor("Azure") buttonCellType.marginLeft = 10.0 buttonCellType.marginRight = 10.0 worksheet.cellType = buttonCellType