2

Using gspread, I know how to access a sheet by name, id or index, like:

import gspread
gc = gspread.authorize(credentials)

worksheet = sh.worksheet("January")

or

worksheet = sh.sheet1

But I was wondering if it is possible to open a last added or last updated sheet?

Gokul Nath
  • 21
  • 3

1 Answers1

0

It's not possible to get the last modification of each spreadsheet sheet because this modification is fetched through Google Drive.

It's possible to obtain the last modification of the entire worksheet using the lastUpdateTime:

import gspread
sa = gspread.service_account('authentication')
sa.open("worksheet name").lastUpdateTime
Ryan
  • 1
  • 1