Upload and convert XLSX to Google Sheets with PyDrive
问题 I am trying to upload a .xlsx file to google drive. I am able to upload it. But when we try to open the same file in Drive, it has to be opened with Google Sheets. Thus, it creates a new file with same name and consumes Drive space. I suppose I need to change the MimeType while uploading. What I have tried is : file = drive.CreateFile({"parents": [{"kind": "drive#fileLink", "id": FolderID}] ,'title': fileName ,'mimeType':'application/vnd.ms-excel'}) file.SetContentFile('12dec2018.xlsx') file