ValueRenderOption
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
枚举 |
FORMATTED_VALUE |
系统会根据单元格的格式在响应中计算和设置值的格式。格式取决于电子表格的语言区域,而不是发出请求的用户的语言区域。例如,如果 A1 为 1.23 ,A2 为 =A1 且采用货币格式,则 A2 会返回 "$1.23" 。 |
UNFORMATTED_VALUE |
系统会计算值,但不会在回复中设置格式。例如,如果 A1 为 1.23 ,A2 为 =A1 且采用货币格式,则 A2 会返回数字 1.23 。 |
FORMULA |
系统不会计算值。回复将包含相应公式。例如,如果 A1 为 1.23 ,A2 为 =A1 且采用货币格式,则 A2 会返回 "=A1" 。 Google 表格会将日期和时间值视为小数值。这样,您就可以在公式中对它们执行算术运算。如需详细了解如何解读日期和时间值,请参阅日期和时间值简介。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-22。
[null,null,["最后更新时间 (UTC):2025-03-22。"],[],[],null,["# ValueRenderOption\n\nDetermines how values should be rendered in the output.\n\n| Enums ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `FORMATTED_VALUE` | Values will be calculated \\& formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`. |\n| `UNFORMATTED_VALUE` | Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`. |\n| `FORMULA` | Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date \\& time values](https://developers.google.com/workspace/sheets/api/guides/formats#about_date_time_values). |"]]