I'm developing add-in that copies data from Excel to PowerPoint for Office (office.js) but I can't get the opened PowerPoint presentation to write in it. I know that in the past it was not possible, but I thought that they improved the API, I have read the documentation, but I cannot find any solution. Have anyone from idea?
2 Answers
The Office JavaScript API doesn't provide anything for that. Office web add-ins work for the currently opened document/presentation only and run in the browser sandbox where you can't perform IO operations with local files except the sandbox. Instead, you may consider making a web API call where you could use the Open XML SDK for editing files on the server side. Also you may find the following articles helpful:
- Understand when and how to use Office Open XML in your Word add-in
- Work with workbooks using the Excel JavaScript API
You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team goes through the planning process.

- 47,483
- 3
- 24
- 45
I'm not entirely clear on what your scenario is, but if the Excel workbook is stored on a SharePoint or OneDrive folder, you can have an add-in in PowerPoint use the Microsoft Graph APIs to open it and get data and paste the data into the open PowerPoint document. This sample does that: PowerPoint-Add-in-Microsoft-Graph-ASPNET-InsertChart.

- 9,038
- 1
- 14
- 32