question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to open sheet by sheetname in a Shared Drive

See original GitHub issue

Important: Please do not post usage questions here. To get a quick response, please ask a question on Stack Overflow using gspread tag. See existing questions: https://stackoverflow.com/questions/tagged/gspread


Describe the bug Getting SpreadSheetNotFound errors when trying to open a sheet inside a Shared Drive by its sheetname. Opening via the url works fine, but I can’t open via the sheet name.

To Reproduce Steps to reproduce the behavior:

  1. Create a shared drive that’s shared to your service account.
  2. Create a Sheet within that shared drive.
  3. Try to open via the sheet name.

Expected behavior Trying to open a sheet via the sheetname using gc.open with a spreadsheet that’s inside a Shared Drive. The service account has been shared with the service account.

Code example* sheet = gc.open(sheetname)

Environment info:

  • Operating System [e.g. Linux, Windows, macOS]: Windows
  • Python version: 3.7
  • gspread version: latest

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yohayonyoncommented, May 3, 2021

Hi @burnash

It didn’t. I had to add a usage f the parameter supportsAllDrives to the method Create. I will create a PR.

0reactions
lavigne958commented, Jul 1, 2021

@ryan-pixel after running some test (see latest comment in #865 ) I noticed GSpread is now able to open files in shared drives using default settings.

I recommend you give it second chance using the latest version from the master branch, as for now the latest release is coming but not out yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues with Google Drive - AppSheet Help
When AppSheet attempts to read your Google worksheet you may see an error like the following: Unable to read the spreadsheet for '<worksheet...
Read more >
Error message when you open or save a file in Microsoft Excel
This error message occurs when you save or open a file if the path to the file (including the file name) exceeds 218...
Read more >
Open a Sheet on a specific tab | Workspace Tips - G Suite Tips
With this simple tip you can open a Sheet on a specific tab using a unique ... we can use some clever tricks...
Read more >
Collecting Sheet Names from a Folder of Excel Workbooks
Try: sheet_names = [] for x in files: sheet_names.append(openpyxl.load_workbook(x).sheetnames). Or, using a list comprehension :
Read more >
Cannot Open Files in Google Drive ? - Top 5 Ways to Resolve ...
Reasons behind the Issue: Cannot Open Shared Files in Google Drive ... At first, open the app for Google Drive, docs, sheets, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found