a-marenkov/gsheets

I cannot create a new spreadsheet using createSpreadsheet()

Closed this issue · 2 comments

Hi,

I tried to create new Spreadsheet using gsheets.createSpreadsheet('GSheet/GSheetTest');. It is returning the data like id. But i cannot find the sheet in google drive. I cant understand whats going on. Anyone can help me?

GSheet/GSheetTest

Hi @sathya4code

The spreadsheet created with service account belongs to it, so it should be found there.

What you're probably trying to achieve is done by following:

  final gsheets = GSheets(_credentials);
  final ss = await gsheets.createSpreadsheet('GSheet/GSheetTest');
  print(ss.id);
  await ss.share('{YOUR_EMAIL}@gmail.com', role: PermRole.owner);

Could you please let me know if it helps. Thanks!

GSheet/GSheetTest

Hi @sathya4code

The spreadsheet created with service account belongs to it, so it should be found there.

What you're probably trying to achieve is done by following:

  final gsheets = GSheets(_credentials);
  final ss = await gsheets.createSpreadsheet('GSheet/GSheetTest');
  print(ss.id);
  await ss.share('{YOUR_EMAIL}@gmail.com', role: PermRole.owner);

Could you please let me know if it helps. Thanks!

Hi @a-marenkov,

Thank you for your response.