What data types does Google Sheets support?
Like you I was unable to find a definitive list of datatypes. However, through personal experience and testing, I verified that Google sheets supports the following data types:
- Decimal (up to 15 digits, scale from +308 to -308, also used to represent integers)
- Double precision floating point numbers
- String (max length: 50,000 characters)
- Boolean (TRUE and FALSE)
- Error code (e.g. #N/A, #DIV/0!, and #REF!)
Note: Dates, Times, and Datetimes are stored as Decimals.
Arrays can also be used in Google Sheets. Arrays behave similar to the way they do in Excel, but Sheets does not restrict the user from editing cells in an array the way that Excel does.
Note on Decimals vs Double: It's important to note: Decimals are just 15-digit integers that can have a decimal point in one of 617 positions; the underlying data structure uses integers. On the other hand, a Double follows the definition of the IEEE 754 double-precision floating point numbers, which are prone to losing precision during calculations.
According to the Google Sheets API v4 (ref) the cell values could be (emphasis mine):
ExtendedValue
The kinds of value that a cell in a spreadsheet can have.
numberValue number
Represents a double value. Note: Dates, Times and DateTimes are represented as doubles in "serial number" format.
stringValue string
Represents a string value. Leading single quotes are not included. For example, if the user typed '123 into the UI, this would be represented as a stringValue of "123" .
boolValue boolean
Represents a boolean value.
formulaValue string
Represents a formula.
errorValue object( ErrorValue )
Represents an error. This field is read-only.