Closed crackedpotato007 closed 4 months ago
That extra '
tells google sheets to treat the value as text.
For example in the sheets UI, if you type 0001
into a cell, you'll see it coerces it to a number 1
, but if you type '0001
it will keep the leading zeros and treat it as a string.
When you set the value, use an actual number (run parseInt
on it first) then it should treat it and save it as you expect.
Yep that was it.
Didn't know about this functionality on sheets. Much appreciated.
I am inputting values to 3 different cells.
2 of which have a numbered input, i.e ticket number(4 digit number) and no of customers served(Decimal/Integer)
If for example the ticket number is 1928, the spreadsheet ends up saying " '1928 ", notice the extra ', same goes for number of person served 1 ends up as '1 and 1.00 ends up as '1.00
Interestingly the third field, which is the name of representative which takes in a string, eg Jake doesn't have this mysterious ' added to it.