I am trying to create a new Workbook inside my OneDrive, using the following API call :
HTTP request:
POST https://graph.microsoft.com/v1.0/me/drive/root:/<path>:/children
Content-Type: application/json
{
"name": "NewBook.xlsx",
"file": { },
"@microsoft.graph.conflictBehavior": "rename"
}
This creates a new workbook in the one drive.
But, when I try to open it (from the OneDrive UI
), it shows that the excel file is corrupted.
Contrary to that, when I try to create a new .txt
or .pptx
or .docx
and then try to access that, it is easily accessible.
The API call that I am making here, is not present in the official MS-Graph API reference. It was a hit and trial done, and it worked. But the file being created is corrupted only in case of Excel.
- If the creation of workbook is not allowed, can anyone provide me with the links as to where it is officially mentioned?
- If its allowed, then what changes do i need to make in the current API call?