Jun 01 2023 05:52 AM - edited Jun 01 2023 05:59 AM
I'm currently developing a M365 PowerPoint Add-in using Office.js. For my requirement I need to retrieve the OOXML structure of the PowerPoint file.
The only way to get the OOXML structure is to request the compressed file by using Office.context.document.getFileAsync method:
Office.context.document.getFileAsync(Office.FileType.Compressed, { sliceSize: 65536 /*64 KB*/ },
(result) => {
// Do something
});
This method works fine, I'm retrieving the XML structure of the document and can further process it.
When I test my add-in in the PowerPoint desktop application, everything works smooth. The time of execution of course depends on the size of the file, simple PPT (40 kb) takes only a few miliseconds.
When I test my add-in in the PowerPoint for web application, the request takes a lot of time in comparison to the size of the document. The request to get the XML file of the presentation varies between 10 and 40 seconds.
The actual HTTP Request which takes the most time is the following:
POST https://euc-powerpoint.officeapps.live.com/pops/ppt/edit.svc/jsonAnonymous/ForceSaveToHost
I tested the behaviour in different browsers, that does not make any difference.