pygsheets freeze first row
Asked Answered
L

2

5

So I am playing with google spreadsheets and there is a handy feature to freeze first row or/and first column. But is there a way to do this through pygsheets?
Or maybe other python library?

Lysis answered 5/7, 2018 at 10:49 Comment(0)
S
6

Use the frozen_row and frozen_column worksheet properties. To freeze the first 2 rows, use wks.frozen_rows=2. See more info in docs

Sophistic answered 5/7, 2018 at 11:4 Comment(0)
L
0

you can try this:

import pygsheets
client = pygsheets.authorize(service_account_file='your json file address')
sh = client.open('your spreadsheet title')

#if you have multiple worksheets
worksheet_names = ['wks1 title','wks2 title',...]
for name in worksheet_names:
    ws = sh.worksheet_by_title(name)
    ws.frozen_rows = 1
Lonely answered 18/1, 2023 at 9:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.