您好,您指的获取value值、text值是如下图所示吗?
对应的代码如下:
- var sheet2 = spread.getSheet(1);
- var combo = new GC.Spread.Sheets.CellTypes.ComboBox();
- combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.value); // 核心代码
- combo.items([
- { text: '测试', value: '1' },
- { text: '测试2', value: '2' }
- ]);
- sheet2.setCellType(0, 0, combo, GC.Spread.Sheets.SheetArea.viewport);
复制代码
|