Floating point values appear in sheet as 0 (zero) #52
-
This is a super-helpful library and the essentials are working great... although whenever I try to valueRange.set(..., a_float) the value appears in the sheet as 0. In the code I'm developing, I mostly want to log temperature. The temperatureC is coming from a Dallas OneWire 18B20 temperature sensor and rtc.temp() is from a DS3231 which returns an (int) in centidegrees Centigrade:
The first two columns 0/1 have their expected values. The next two columns (2/3) are both 0. Your Firebase library says it should work with floats (and a bunch of other types besides), so maybe this is specific to this Sheets library? I could work around by multiplying by 10^precision_needed, but perhaps someone here knows what's needed for this to work as expected. I would ideally like to send a human-readable string time, too. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The ValueInputOption parameter in update and batch functions, will be |
Beta Was this translation helpful? Give feedback.
The ValueInputOption parameter in update and batch functions, will be
USER_ENTERED
by default, you should set it toRAW
when setting float number or set the number string "12.34" which will be parsed as 12.34 when ValueInputOption wasUSER_ENTERED
.