Sam Joseph
Sam Joseph

Reputation: 4704

alternative to setrowsdata in Google Apps Scripts

Writing to a Google Spreadsheet from Google App Scripts is described here:

https://developers.google.com/apps-script/storing_data_spreadsheets#writing

Which includes details of the setRowsData method.

I was wondering if there was a method for just setting an individual cell in the spreadsheet. I've searching Google and SO, but can't find anything yet. I'm guessing perhaps that setRowsData is the only way to go, but if there's an alternative setCellData call or similar I'd love to hear about it.

Many thanks in advance

p.s. profusely sorry if this isn't the right place to ask, but the Google App Script team is directing all questions to SO

Upvotes: 1

Views: 561

Answers (1)

megabyte1024
megabyte1024

Reputation: 8660

The Range.setValue service to set a value of a cell. The range should be defined to the cell, for instance, the follwing code does it.

var range = SpreadsheetApp.getActiveSheet().getRange("A1");

Upvotes: 1

Related Questions