[]
        
首页
开发者学堂
文档
论坛
市场
生态机会
活动
立即试用
(Showing Draft Content)

ICellControl

Interface ICellControl


public interface ICellControl
表示单元格控件。

 IRange range = worksheet.getRange("A1");
 range.setValue(true);
 ICellControl control = range.getCellControl();
 control.setCheckbox();
 CellControlType type = control.getType();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    获取关联区域的单元格控件类型。
    void
    将复选框格式应用于整个区域。
  • Method Details

    • getType

      CellControlType getType()
      获取关联区域的单元格控件类型。

      如果区域中的所有单元格都具有相同的控件类型,则返回该类型。如果区域包含混合控件类型或不存在控件,则返回 CellControlType.None。

      Returns:
      单元格控件类型。
      
       IRange range = worksheet.getRange("A1");
       range.setValue(true);
       range.getCellControl().setCheckbox();
       CellControlType type = range.getCellControl().getType();
       
    • setCheckbox

      void setCheckbox()
      将复选框格式应用于整个区域。
      
       IRange range = worksheet.getRange("A1");
       range.setValue(true);
       range.getCellControl().setCheckbox();
       CellControlType type = range.getCellControl().getType();