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" 。 Sheets 會將日期和時間值視為小數值。這樣一來,您就能在公式中對這些值執行算術運算。如要進一步瞭解如何解讀日期和時間值,請參閱「關於日期和時間值」。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-22 (世界標準時間)。
[null,null,["上次更新時間: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). |"]]