1
votes

I'm trying to upload a spreadsheet to google drive that is a csv file.

Here is my post url https://www.googleapis.com/upload/drive/v2/files?uploadType=multipart&alt=json&convert=true

mimetype is set to mime: application/vnd.google-apps.spreadsheet

The file uploads but I get an error "We're sorry. The spreadsheet at this URL could not be found. Make sure that you have the right URL and that the owner of the spreadsheet hasn't deleted it. "

I also tried mimetype = "text/plain" , it gets converted to a document, not a spreadsheet.

1
I have same problem. It uploads and looks like a spreadsheet in the Drive listing so the MIME type is correct. When I click on the icon, I get the same message as you. If I upload the file manually, it correctly converts to a spreadsheet. The mime type is correct and the file uploads, what causes this message?Robert

1 Answers

2
votes

The mime type should be "text/csv".

You can try to upload the file at https://developers.google.com/drive/v2/reference/files/insert#try-it to quickly experiment with different settings.