1
votes

Insert an object in sheets (ex: https://developers.google.com/apps-script/reference/spreadsheet/sheet#insertImage(String,Integer,Integer)):

var obj = sheet.insert{ObjectType}(args.);

You can call your charts in sheets:

var chart = sheet.getCharts()[0].modify().{params}.build;

And can call objects in docs:

docs.getBody().findElement(DocumentApp.ElementType.{object type}, null);

What's the equivalent for finding objects in sheets, i.e. is there a gsheets dom model like there is for docs? or are non-chart objects inaccessible through gAppscript?

//get objects in sheet    
var obj2 = sheet.getObject()[0]
//error, method doesn't exist
//
//get objects near a range
var obj3 = sheet.getRange(x,y).getObject()
//error
1

1 Answers

0
votes

Maybe I'm missing something here, but data in Sheets isn't organized the same way it is in Docs. What kind of "objects" are you trying to find? I think you should be able to retrieve and manipulate most anything with a combination of getRange, getValues, and setValues.