rose
rose

Reputation: 667

How to print contents of google scripts logging console into spreadsheet?

Is there a way to print the contents of google scripts logging console (tools-> script editor -> view -> logs) into the spreadsheet?

Upvotes: 0

Views: 1955

Answers (1)

tehhowch
tehhowch

Reputation: 9862

var stringToWrite = Logger.getLog();
SpreadsheetApp.getActive().getActiveSheet().getRange("A1").setValue(stringToWrite);

See the documentation: https://developers.google.com/apps-script/reference/base/logger

Upvotes: 1

Related Questions