[]
Serializable, Comparable<EditorValueType>, Constable使用此枚举可以控制存储所选项的显示文本、从零开始的索引或底层项值。此枚举通常与 ComboBoxCellType 一起使用。
ComboBoxCellType cellType = new ComboBoxCellType();
ComboBoxCellItem item1 = new ComboBoxCellItem();
item1.setText("United States");
item1.setValue("US");
cellType.getItems().add(item1);
ComboBoxCellItem item2 = new ComboBoxCellItem();
item2.setText("China");
item2.setValue("CN");
cellType.getItems().add(item2);
cellType.setEditorValueType(EditorValueType.Value);
worksheet.getRange("A1").setCellType(cellType);
worksheet.getRange("A1").setValue("CN");
Enum.EnumDesc<E extends Enum<E>>static EditorValueTypeforValue(int value) intgetValue()static EditorValueTypestatic EditorValueType[]values()name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is null