google apps script - Converting Decimals to Integers from getValues() -
i'm ready data google sheets doc following line
startrow = 4; sheet = spreadsheetapp.getactivesheet(); data = sheet.getrange(startrow,1,8,23).getvalues();
i'm looping through these values , want send them in google analytics event value when log values data come out decimals, example, 987.0.
i've formatted cells don't have decimal points , have made sure data contains no decimal points.
is there anyway can convert values in data decimal integer?
appreciate help.
what looking parseint()
. docs can found here:
https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/parseint
startrow = 4; sheet = spreadsheetapp.getactivesheet(); data = sheet.getrange(startrow,1,8,23).getvalues(); var myint = parseint(data[0][0]);
Comments
Post a Comment