I am trying to open a google spreadsheet using:
import gspread
sheet = gc.open_by_key(sheetkey)
after opening the sheet. I want get the name of document that was opened.
The title of the spreadsheet is stored as an object variable title
. You can simply do sheet.title
to get the title. Docs
The same can be done for worksheets as well.