本帖最后由 Dtttax 于 2025-1-15 14:19 编辑
还是不行。
目前的做法是一个弹窗的时候有个按钮,点击按钮就有个公式框选择
let fbx = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(div, {
rangeSelectMode: true,
})
fbx.workbook(instance)
this.topFbx = fbx
this.topFbx.startSelectMode()
this.topFbx.focus()
然后不选择表单的范围,直接关闭窗口,同时调用下面的代码。
let text = this.topFbx.text()
this.topFbx.text(text)
this.topFbx.endSelectMode()
sheet.getParent().commandManager().execute({cmd:"cancelInput",sheetName:sheet.name()});
sheet.bind(GC.Spread.Sheets.Events.EditChange, function (sender,args) {
sheet.endEdit(true)
});
就会出现一点击单元格有这种选择的框。
|