This is from the Help file (emphasis added):
Note: QlikView Expressor Datascript includes functions that are not part of Lua, and some functionality available in Lua has been removed from QlikView Expressor Datascript. Specifically, the ability to invoke functions in the Lua I/O, OS, and debug libraries, as well as the ability to call batch/script files, are not accessible to a QlikView Expressor script. Additionally, some Lua functions have been overwritten or removed from QlikView Expressor Datascript. Consequently, the function API descriptions included in the QlikView Expressor documentation are definitive and should be used instead of the descriptions in the Lua Reference Manual.
We use custom operators to run java programs using io.popen. If using Read Custom, your java program can return a result over stdout and the read function will get that value. Not sure if this sort of thing will work for your needs. If you need a variable number of random numbers, you could pass that to java and it can return multiple values. It would act like getting n records each with one column.
If you want to call macro from the script try the below code
Inc = Value+1
LET _VAR1 = Inc(1);
if you want to add a column with random number below is the code
LOAD [Date&time] as test,Rand() as Teest
(ooxml, embedded labels, table is Sheet3);