'How to insert data into "Sheet2" in Sharepoint Spreadsheet using sharepy in python

Here is my code:

import sharepy

s = sharepy.connect("https://xxx.sharepoint.com", username='[email protected]', password='xxx')

with open("file.xlsx", "rb") as file_data:
    try:
        response = s.post(url = "{url of file}", data=file_data)
    except Exception as err:
        print("Some error occurred:",str(err))

From the above code I am able to insert data into spreadsheet but it is inserting into "Sheet1" but I want to insert into "Sheet2". Can someone help me how can I achieve that.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source