I haven't been able to find an answer online for this or in the Sheets documentation. What data types does a single cell in Google Sheets support?
For example here is what I've seen so far:
Is there a list of acceptable data types that Google Sheets accepts?
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With