Google表格中的数据类型是什么? [英] What is this data type in Google Sheets?

查看:66
本文介绍了Google表格中的数据类型是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Google表单,将结果存储在Google表格中,该表格显示了以下屏幕抓图.

I have a Google Form that stores it's result in google sheets of which the following screen grab I have shown.

Google表单也在计算分数,这就是电子表格中名为 Score 的列的原因.

Google form is also calculating score and that is why there is this column named Score in spreadsheet.

底部选择的单元格显示 20/30 作为值.但是在最上面的字段(即突出显示)上只显示了 20 .我想通过Google App脚本读取整个值 20/30 .截至目前,我仅通过Google App脚本获得了20.

Selected cell at bottom shows 20/30 as value. But on the top field(i.e., highlighted) it just says 20. I want to read the whole value 20/30 through Google App Scripts. As of now I am only getting 20 through Google App Scripts.

推荐答案

这是单元格中 20 的原始值,其自定义数字格式为 0 \/\ 3 \0 .作者假设您知道分子将为30,因此可以将其硬编码为任何计算或公式.除非您获取单元格的数字格式并解析出分母,否则您只能读取显示的分子的原始值(例如 20 ).

This is raw value of 20 in a cell with a custom number format of something like 0\/\3\0. The author assumes you know the numerator is going to be 30 so that can be hard-coded into any calculation or formula. You can only read the raw value of the displayed numerator (e.g. 20) unless you grab the cell's number format and parse out the denominator.

tldr:

您键入 20 ,单元格显示 20/30 ,但其值仍为 20 .

You type in 20 and the cell shows 20/30 but its value remains 20.

这篇关于Google表格中的数据类型是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆