Unable to open sheet by sheetname in a Shared Drive
See original GitHub issueImportant: 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:
- Create a shared drive that’s shared to your service account.
- Create a Sheet within that shared drive.
- 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:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @burnash
It didn’t. I had to add a usage f the parameter supportsAllDrives to the method Create. I will create a PR.
@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.