If this is an exact copy of your script then you have a space in-between A1.
and replace
but I assume it is not.
@SergeInsas is right the content needs to be a string for the replace()
function to work, so if your trying to replace the .
in a decimal number then you can use the toString()
method first like below.
var FILE = SpreadsheetApp.openById("xyz");
var CONTENT = FILE.getSheetByName("Sheet1");
var A1 = CONTENT.getRange("I17").getValue();
var A1String = A1.toString().replace(".", "");
Or you can multiply the number to get rid of the decimal but this will depend on how many decimal places you have :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…