The function that you are using "getValues()
" is intended to capture more than one cell. As this function is designed to capture a table it give in output a result that is not the value of one cell but the value of several cells. to display them we need to store them in something that it's easily accessible and structured : an array.
The array is represented as: [cell1Value, cell2Value, cell3Value, ...] .
As there may have more than one row we store each row in an other array: [row1, row2, row3, ...]. so in the end it's something like that:
[ [row1Cell1, row1Cell2, ...], [row2Cell1, row2Cell2, ...] ]
You don't want these brackets, change "getValues()
" for "getValue()
" without "s".
Or when you set the value use:
amoutdue[0][0]
the first [0] is to say I want the first row (we start at 0) and the second [0]... you already guessed is for the first cell.
I suppose that you are getting the ".0" after "32" because as you are trying to set the array of array in a cell. Javascript don't know how to handle that and try to transform the array of array in full text.