negative numbers formatted as text
I am using the JSON string below to add rows to a sheet via the API
However if the value is negative, as in this case, the value is entered as a string rather than a number so -9987.5 becomes '9987.5
Positive values work just fine
I believe something has changed recently as this didn't happen before. How can I specify that the number be treated as a number and not a string
[
{
"cells": [
{
"value": "-9987.5",
"strict": false,
"columnId": 3952583094101892
}
],
"format": ",,,,,,,,,,,,,,2,,",
"parentId": "6622467836563332"
}
]
Best Answer
-
Have you tried removing the quotes from around the number?
Answers
-
Have you tried removing the quotes from around the number?
-
Thanks. I should have thought of that
-
Happy to help. 👍️
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives