gsheets 0.2.3 copy "gsheets: ^0.2.3" to clipboard
gsheets: ^0.2.3 copied to clipboard

outdated

A library for working with Google Sheets API v4. Manage your spreadsheets with gsheets in Dart.

example/gsheets_example.dart

import 'package:gsheets/gsheets.dart';

// your google auth credentials
const _credentials = r'''
{
  "type": "service_account",
  "project_id": "gsheets-267409",
  "private_key_id": "f6d682bc3842d75bd2d2662903e9b1499949245c",
  "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC19PrbK/aIJqkB\nEq2CMSqYzklE2sg08tfXMoTNOFhHtytpjYRXZD+YRnPFEwhEkF84yyAwGHpAMLkt\nIq8Zz4+P72bmYuXEPg3SY2V3vvUpHeyb1vyPvgnwGA/lI7mzJfHdMhULso0aIx8R\nADhRLxL5zYz1k7uYgGcE1jhYMmJulu6X/uc3s4nM/u7Q+0k2a3ComIJWuFOmApNc\nuBikLdaQRmgxWmGREAC1GFHi9ATCFbsoD9ZAnl6fgJusWc+BIzveZ+Hog4uVQ2UW\n3yJQOLJueTzc7nNDZ6VvTTDhAHifjlFsZ4uZiWCuB2re4Qm/KGxDakFrawdSe/FI\nsLwdATN7AgMBAAECggEADUcVhdLScvhR6C3NvYIK+ArtlnmvQbXgLD2X1UXho0dp\ngpKnb/J1IDkxOitRCiJ4NbO/jeLrYNhtWtl8v5HBiculeEsKiznKq79Bve2QWZzB\nEaosKe0V2pBW8JidH3E1vLdqiRJRcPEpKNtu60sCbnoiaXU2AO3ga/OZ5E22Qxg0\nRtF+tuh/Dt35hrJxqDrugubgf2buRzZ+Lo4v37/j8uPH9mOzXYtWigJlIx1HevO1\nESvpbo6IbVtQcxyfuYPW9c78GKn3xglD98AyWchL0WVwF4v4IMpmcH7fBYXrsopo\nfOqwTSyalKFWQfcsmc4A6u6E2c5fVUrEtehIlbAlsQKBgQDgJ7DxM9V1L8Y4kMWm\n/5kU22LsHx+y3Stezv1YlRhRUgCwXmvPo7qjchZ0YqwWMOKiDK9KaUuEQWn7l+ql\nn6FT4f4lxMUUYUTwNSQeyGev8Xg5UFkp8dnlPkKmDMdyiUefUXoLI1QsRHCAPPBb\nRhEi8K/sf4uDeoswUDAdLLxVWQKBgQDPzpVuYh+IOGLtIxKfqYF4YLxtG9g0HDeu\nebB8L5JekgavX/d8riXXvQrMBd7We+b+ps6XF9RhJSDJ4c70vFPBZD88pi0beD46\nlhnmW4xDL/E20HBCw9kyyazfR16gP2G+r23o0U3AqtRgGQEVxRbtM2zHI0Pb788+\nX761Iyew8wKBgQCOGxumDsJoxJzaB44GzUvzWRJht2mVL3nrZTZgDkWYaHBfX7zh\nql8Md6ucpWGLv/ot2fTXK+HgOshB5JGx5n2UfFVvBEwdG31k+4umqE5z0JXzX+jn\nGpiVKN9//eIDztxFOJYysXcPiWP5KKkIdGcwy338ZO/BrtLHEk8ub8oGIQKBgBEa\nfa4SIWpCydGeu1+swd04iQmp6weO8v5HQcFW4QMrnaU9js8SPkcdZhAYw5h/pil7\nbTF+YpqERciX70KxZWtbZuEFBF1obibAR+1vx4GYJpBOY477M5s8gh/2bdFephrd\nsXwiDfY3mTc3l6FFEXgAbYmOW310pWgK1VVvSUsFAoGBAMpx8gu+Xq5T+U208I12\n0tgCBJPTfqGMzduQT3teVWVK6yDxPLQxy66kswLkJKzLOkGvF9dCMOOMLq42Q8U5\ntdyEtZrBDXnBN+HHIG5DceZFOksWKb0ASx3OKbZUKIpyKJJLiIgzpPkeuIRMkl1i\nu3ZOiGpyNXd1EYBtuyeP3rQi\n-----END PRIVATE KEY-----\n",
  "client_email": "gsheets@gsheets-267409.iam.gserviceaccount.com",
  "client_id": "118265094446146377988",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/gsheets%40gsheets-267409.iam.gserviceaccount.com"
}
''';

const _spreadsheetId = '120aa313FsnNrTW4DOCQpuYvhjo2lydagiyASDcPDXTI';

void main() async {
  // init GSheets
  final gsheets = GSheets(_credentials);
  // fetch spreadsheet by its id
  final ss = await gsheets.spreadsheet(_spreadsheetId);
  // get worksheet by its title
  var sheet = await ss.worksheetByTitle('ex/1');

  print(await sheet.values.column(1));


}
254
likes
0
pub points
95%
popularity

Publisher

unverified uploader

A library for working with Google Sheets API v4. Manage your spreadsheets with gsheets in Dart.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

googleapis, googleapis_auth, http, meta

More

Packages that depend on gsheets