Files:Create API, creates empty MS Excel/Word which cannot be opened in the Google Sheets/Doc editor

When using Files:Create API to create a MS Word or Excel without attaching any input file in request, it results in the respective files being created, but the created files cannot be opened in the editors - Google Doc or Google Sheet and gives the following error:

samriddhi_sri_0-1676265417792.png

Ideally it should be possible as any MS Word or Excelthat is uploaded to the Drive can be opened with the said editors. Also if we create a Google Doc with the same request (by giving the respective mimeType) the file is created and it can be opened in the editor.

Following request body used for creation:

{
"parents": [
"<parentFolderId>"
],
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"name": "Test Excel Doc"
}

Wanted to understand the reason for this restriction for MS Documents.

Thanks!

0 0 95
0 REPLIES 0
Top Labels in this Space
Top Solution Authors