Ability to open/replace workbook with Excel JS API in a similar way Word API can with insertFileFromBase64
We have a requirement to load a workbook from a remote source from within the add-in. User logs in, selects from a list and workbook template loads.
With the Word JS API we can load a template remotely using an AJAX call that returns the workbook as a base64 string and then insert the response into the current workbook using the replace option. AFAIK this doesn't exist for the Excel API and we download the workbook and then instruct the user to open from the download pane.
The API is in preview for Excel Desktop and Mac now!
This feature is not be able to GA due to this API is not available on Excel online due to the Excel online cannot insert worksheet from the external workbook, so Team is now working on investigating on Excel online. and figure out the features that we can support now and our strategy is to build addFromBase64 for Excel Online with a limited supported feature, which allow us to GA this API. and then we will continue iterating this API to support more features
For Excel Desktop and Mac beta preview. you could use our Beta CDN, more info on this here https://aka.ms/excelapiopenspec
Here is a sample code snippet using the API
key line of code context.workbook.worksheets.addFromBase64(mybase64)
send an xlsx (base64 encoded)
please use it and send us feedback!
This works well for our use cases, however it has been in Beta for a very long time - We can not put to production while it is not GA. Is there any update on when it will be GA please?
I need to know if its available in GA
Is this now available in GA
Amit Lohogaonkar commented
This works in installed office 365 excel!! When it will be available in general production release?
Office Dev Team, the form presented in the link doesn't seem to be working--no permissions to view.
Hello, Thanks everyone for your support, would you please help fill the survey for this API. we would like to better understand your requirements. Thanks a lot
Zachary Di Sabatino commented
Need this API! Very much needed in production to enable our clients to integrate their current Excel workbooks with our product.
Ronel Marbella commented
Need this API in production! Solves a very real and valuable use-case for our customers, helping them to make more effective use of Excel.
I agree with all previous comments. We need a timeline on when we can use this API in production. My devs love using it but we can't use it while it's still in DEV. As this request was originally from June 2016, I would hope Microsoft Office DEV team could give software developers a definitive plan.
+1 to those below, sorely needed!
David Greenwood commented
When could this go GA?
Hi! I have a query regarding this API, the method will insert the sheets to your current opened sheets in Office but what if we want to delete the existing sheets and add the newly opened one. is there a way to do that?
/Hi! We tried using addFromBase64(myBase64) in Office 365 insider build and it is working. We want to know when will this API be available in production release of Office JS?
Hi! We also tried using context.workbook.worksheets.addFromBase64(mybase64) and it gives This operation is not implemented error. We have Beta CDN for Office JS and excel-web-16.00.js. Are we missing something here?
Aaron Nwabuoku commented
Hi! Is there a timeline of when this is expected to be stable and released? We tried using the API, following https://gist.github.com/jipyua/caec8eb5fddc0f611c43a1dbb356fa2a but received a "Not Implemented" error. We would like to send OOXML fragments from our remote servers to our Office Online Add-in going forward and this endpoint would be instrumental for that approach. Thanks!
Bowei Han commented
We are trying to do something similar but the API - context.workbook.worksheets.addFromBase64(mybase64) - is throwing a "Not Implemented" exception for us even though we have the Beta CDN in office online. In the documentation it says that replace workbook is a beta feature - https://github.com/OfficeDev/office-js-docs - but the API is not included in the exhaustive list - https://github.com/OfficeDev/office-js-docs/blob/ExcelJs_OpenSpec/betaMembers.md. Is there something that we are missing?
Dalibor Grudenić commented
Still very much needed even 2 years after original post.
Still very much needed.
Abhinav Tripathi commented
Looking forward to any updates on this thread.