Value options
Rendering and inserting data in Google Spreadsheets.
Value Render Option
You can add the optional mode
parameter to your GET
requests. It controls how the values should be displayed. This parameter can have the following values:
FORMATTED_VALUE
(default) - Values will be calculated & formatted in the reply 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".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.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".
Value Input Option
You can add an optional mode
parameter to your POST
and PATCH
requests (create and update). It controls whether the input strings are parsed and how. This parameter can have one of two values:
USER_ENTERED
(default) - The input is parsed exactly as if it were entered into the Google Sheets UI, so "Mar 1 2016" becomes a date, and "=1+2" becomes a formula. Formats may also be inferred, so "$100.15" becomes a number with currency formatting.RAW
- The input is not parsed and is simply inserted as a string, so the input "=1+2" places the string "=1+2" in the cell, not a formula. (Non-string values like booleans or numbers are always handled as RAW.)