RAND
function RAND(): number | string | boolean
Description
Returns a random number greater than or equal to 0 and less than 1, evenly distributed (changes on recalculation).
Returns
number | string | boolean
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.RAND());