[]
Used to display a button in a cell. Supports customizing the button text, background color, and margins relative to the cell edges. Can be applied to a single cell, a range, a row, a column, or an entire worksheet via IRange.setCellType(BaseCellType) or IWorksheet.setCellType(BaseCellType).
ButtonCellType button = new ButtonCellType();
button.setText("Click Me");
button.setButtonBackColor("Azure");
button.setMarginLeft(10);
button.setMarginRight(10);
worksheet.getRange("A1").setCellType(button);
doubledoubledoubledoublegetText()voidsetButtonBackColor(String value) voidsetMarginBottom(double value) voidsetMarginLeft(double value) voidsetMarginRight(double value) voidsetMarginTop(double value) void
ButtonCellType button = new ButtonCellType();
button.setText("Submit");
String text = button.getText();
ButtonCellType button = new ButtonCellType();
button.setText("Submit");
value - The text content of the button.
ButtonCellType button = new ButtonCellType();
button.setButtonBackColor("Azure");
String color = button.getButtonBackColor();
ButtonCellType button = new ButtonCellType();
button.setButtonBackColor("Azure");
value - The background color of the button.
ButtonCellType button = new ButtonCellType();
button.setMarginLeft(6);
double marginLeft = button.getMarginLeft();
ButtonCellType button = new ButtonCellType();
button.setMarginLeft(6);
value - The left margin of the button in pixels.
ButtonCellType button = new ButtonCellType();
button.setMarginRight(6);
double marginRight = button.getMarginRight();
ButtonCellType button = new ButtonCellType();
button.setMarginRight(6);
value - The right margin of the button in pixels.
ButtonCellType button = new ButtonCellType();
button.setMarginTop(6);
double marginTop = button.getMarginTop();
ButtonCellType button = new ButtonCellType();
button.setMarginTop(6);
value - The top margin of the button in pixels.
ButtonCellType button = new ButtonCellType();
button.setMarginBottom(6);
double marginBottom = button.getMarginBottom();
ButtonCellType button = new ButtonCellType();
button.setMarginBottom(6);
value - The bottom margin of the button in pixels.