Search code examples
javascriptexcelms-officeadd-inpane

Task Pane Add-in: Equivalent of Document.getFileAsync method for Excel 2013 Desktop?


I am developing a Task Pane add-in for Microsoft Word, Excel, and PowerPoint desktop. I would like to have the ability to read the entire contents of the file and save it as a new document to a third-party application. Microsoft Word and PowerPoint support the Document.getFileAsync method to get the entire contents of a file; however, Excel desktop does not seem to support this functionality. Excel Online does, and I can actually use that method to save a new Excel file to my third-party app. Is there any way that I can get the contents of an Excel file using a desktop Add-in in order to create a new file?

I am using Microsoft Office Home and Business 2013 to test.


Solution

  • At this time, you already mentioned it yourself, the getFileAsync option is not yet available for Excel -on the Desktop- (see table on the bottom of https://msdn.microsoft.com/en-us/library/office/jj715284.aspx ).

    So your option, for now, might be using the Ooxml coerciontype using OpenXML: Some examples: https://msdn.microsoft.com/en-us/magazine/jj991976.aspx

    I'm sure it is a matter of time, but that's not the answer you wanted to hear today.