JonathanHolvey / sharepy

Simple SharePoint authentication for Python
GNU General Public License v3.0
175 stars 52 forks source link

How to upload data into "Sheet2" instead of "Sheet1" #61

Open abhishek-lakra opened 2 years ago

abhishek-lakra commented 2 years ago
import sharepy

s = sharepy.connect("https://xxx.sharepoint.com", username='xxx@xxx.com', 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.