I want to create a sheet (aka table) in DT3 and add data to it using JavaScript. Creation is simple and works:
var sheet = app.createRecordWith({name: "Ausgaben " type: "sheet", columns:["A", "B", "C"] });
Adding a row, however, only gives me the error message “Error -1708: Mitteilung unverständlich.”
(Message incomprehensible). However, an empty row is added to the sheet.
Here’s what I tried:
sheet.addRow({cells: ["1","2","3"]});
app.addRow(sheet, {cells: ["1","2","3"]});
sheet.addRow(sheet,["1","2","3"]);
sheet.addRow(["1","2","3"]);
sheet.addRow({cells: {"A": "1", "B": "2", "C": "3"});
sheet.addRow( {"A": "1", "B": "2", "C": "3"});
From the output of “Events” in the Script Editor, there’s no difference between app.addRow(sheet,…)
and sheet.appRow(…
. However, the method call doesn’t work regardless of the kind of parameters I pass.
What is the correct way to use this method?