英文:
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?
答案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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论