How to create an input range slider in Google Sheets (is it possible)

huangapple go评论61阅读模式
英文:

How to create an input range slider in Google Sheets (is it possible)

问题

I'm here to assist with the translation. Here's the translation of your provided text:

"我们实际想要的是一个数据验证字段,其中显示为可拖动的输入滑块,而不是芯片、箭头或纯文本。在Google表格中是否有可能实现这一点?显然,数据验证字段的显示样式中没有可拖动滑块选项。在Google表格中是否有其他方法可以实现这一目标?"

英文:

What we essentially want is a Data Validation field where the display is a draggable input slider, rather than a Chip, Arrow or Plain Text. Is this possible in Google Sheets? Clearly there is not a Draggable Slider option for the Display style for data validation fields. Is there any other way to achieve this in Google Sheets?

How to create an input range slider in Google Sheets (is it possible)

答案1

得分: 2

I'll only provide translations for the non-code parts:

"It's not possible. You cannot inject HTML in Sheet cells, and there isn't even a validation rule that would fit a slider. VALUE_IN_LIST/RANGE doesn't work because the values could be other than numerical, and NUMBER_BETWEEN would also require to figure out the smallest step that the slider can take, which it currently does not do (Excel does this and calls it 'incremental change').

Your only option could be to use a custom sidebar or a modal dialog with Google Apps Script and build the slider with HTML, which can then communicate back to the Sheet. Unless you're really committed to this slider, it's probably not worth building an entire HTML interface for this unless you plan to have a full form, and if you want to set the slider on several cells, it just sounds unfeasible."

英文:

It's not possible. You cannot inject HTML in Sheet cells, and there isn't even a validation rule that would fit a slider. VALUE_IN_LIST/RANGE doesn't work because the values could be other than numerical, and NUMBER_BETWEEN would also require to figure out the smallest step that the slider can take, which it currently does not do (Excel does this and calls it "incremental change").

Your only option could be to use a custom sidebar or a modal dialog with Google Apps Script and build the slider with HTML, which can then communicate back to the Sheet. Unless you're really committed to this slider it's probably not worth building an entire HTML interface for this unless you plan to have a full form, and if you want to set the slider on several cells it just sounds unfeasible.

huangapple
  • 本文由 发表于 2023年4月6日 22:02:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/75950413.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定