0

I want to create an empty tab via pyghseets and add N rows, like I would do with the following button:

enter image description here

Is there an easy way to do this in pygsheets?

Thanks!


Edit:

My base code is the following:


import pygsheets

client = ### # Please use your client.

spreadsheet_id = "###" # Please set your Spreadsheet ID.
sheet_name = "Sheet to create" # Please set your sheet name.
N = 10000
sh = client.open_by_key(spreadsheet_id)

# Create sheet_name and add N rows below
David Masip
  • 2,146
  • 1
  • 26
  • 46

1 Answers1

1

This does the job:



import pygsheets

client = ### # Please use your client.

spreadsheet_id = "###" # Please set your Spreadsheet ID.
sheet_name = "Sheet to create" # Please set your sheet name.
N = 10000
sh = client.open_by_key(spreadsheet_id)
sh.add_worksheet(sheet_name, rows=N)

David Masip
  • 2,146
  • 1
  • 26
  • 46