任务窗格外接程序:相当于文档。Excel 2013桌面的getFileAsync方法?

时间:2023-01-24 20:26:06

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?

我正在为Microsoft Word、Excel和PowerPoint桌面开发一个任务面板插件。我希望能够读取文件的全部内容,并将其作为新文档保存到第三方应用程序中。微软的Word和PowerPoint支持该文档。获取文件的全部内容的getFileAsync方法;然而,Excel桌面似乎不支持这个功能。Excel Online有,我可以用这个方法将一个新的Excel文件保存到我的第三方应用程序中。我是否可以用桌面外接程序获取Excel文件的内容来创建一个新的文件?

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

我正在使用Microsoft Office Home和Business 2013进行测试。

1 个解决方案

#1


1  

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 ).

此时,您已经提到了它,getFileAsync选项还不能用于桌面的Excel—(请参见https://msdn.microsoft.com/en- us/library/office/j715284.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

因此,现在您的选项可能是使用OpenXML使用Ooxml强制类型:一些示例: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.

我肯定这只是时间问题,但这不是你今天想听到的答案。

#1


1  

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 ).

此时,您已经提到了它,getFileAsync选项还不能用于桌面的Excel—(请参见https://msdn.microsoft.com/en- us/library/office/j715284.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

因此,现在您的选项可能是使用OpenXML使用Ooxml强制类型:一些示例: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.

我肯定这只是时间问题,但这不是你今天想听到的答案。