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
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives