Search code examples
office-jsoffice-js-helpers

Create excel work book using bytes using Excel.js API


We have started a new feature to our product where user can interact through excel plug-in to use some of the product services. we opted of using Excel.js.

Following is one of the main feature which is important to us and didn't find in the Exceljs API's.

Server will be sending the byte format of the workbook to the js, and intention is to create workbook using byte. Is there any API which will help to create workbook using byte format. Referred through the docs but didn't find any.

Other feature is, there will be a upload/save button and intention is to convert the existing workbook to bytes and send to server. Is there any API to convert working workbook to byte format.

Please include this feature in future release if not exists, it will be so helpful. if exists please advice.

Thanks in advance!!


Solution

  • @MSFT-Jipyua has a good answer for getting the file. To send the file as bytes use the getFileAsync method, which is in the Common Office JavaScript APIs, not the Excel-specific APIs like createWorkbook.