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
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 429 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 284 Events
- 35 Webinars
- 7.3K Forum Archives