How to connect google spreadsheet more sheets?

I’ve tried to connect google spreadsheet with the BUG REPORT templete and it works.
https://streamlit-example-app-bug-report-streamlit-app-lrm3fx.streamlitapp.com/

but I don’t know how to connect more sheets at once.

There are several functions like example-app-bug-report/streamlit_app.py at main · streamlit/example-app-bug-report · GitHub which use the constant SPREADSHEET_ID inside of them. If you change those functions so that you pass in the spreadsheet id, you can call it with as many different spreadsheet ids as you want. For example

def get_data(gsheet_connector, spreadsheet_id) -> pd.DataFrame:
    values = (
        gsheet_connector.values()
        .get(
            spreadsheetId=spreadsheet_id,
            range=f"{SHEET_NAME}!A:E",
        )
        .execute()
    )

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.