Sub ForEachItemInArray() '' e17
Dim arrValue As Variant
Dim Item As Variant
Dim rw As Long
Dim Col As Integer
arrValue = Array("Item 1", "Item 2", "Item 3")
rw = 2
Col = 2
For Each Item In arrValue
Cells(rw, Col) = Item
rw = rw + 1
Next Item
End Sub
(function()
{
var oSheet = Api.GetSheet("Sheet1");
var row = 2;
var col = 2;
var arrValue = ["Item 1", "Item 2", "Item 3"];
arrValue.forEach(function(item) {
oSheet.GetCells(row, col).SetValue(item);
row++;
});
})();