Created
January 12, 2020 18:15
Append to Spreadsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final _credentials = new ServiceAccountCredentials.fromJson(r''' | |
{ | |
"private_key_id": "***", | |
"private_key": "***", | |
"client_email": "***", | |
"client_id": "***", | |
"type": "***" | |
} | |
'''); | |
const _SCOPES = const [SheetsApi.SpreadsheetsScope]; | |
clientViaServiceAccount(_credentials, _SCOPES).then((httpClient) { | |
var sheetsApi = new SheetsApi(httpClient); | |
sheetsApi.spreadsheets.values.append( | |
ValueRange.fromJson({"values": [["QR", "Авангард", "цвет формы", "#игрока", "фамилия игрока"]]}), | |
"<spreadsheet_id", | |
"A1:Z998", | |
valueInputOption: "USER_ENTERED").then((response){ | |
print('it works!'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment