I uploaded .xlsx successfully from my local PC to google drive using this simple function. The mimetype I am using should convert .xlsx to normal google sheet
def writeToGDrive(filename):
file_metadata = {'name': filename,'parents': [FOLDER_ID]}
media = MediaFileUpload(filename,mimetype='application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet', resumable=True)
file = service.files().create(body=file_metadata,media_body=media,fields='id').execute()
return file.get('id')
but when I am trying to read or edit
mySpread=service_sheet.spreadsheets().get(spreadsheetId=spreadSheet_Id).execute()
It gives me this error
returned "This operation is not supported for this document">
Also when tried to use gspread it gives me this error
gspread.exceptions.APIError: {'code': 400, 'message': 'This operation is not supported for this document', 'status': 'FAILED_PRECONDITION'}
I want to edit this .xlsx on google drive then export it as .xlsx again to local drive