Office.js应用程序:Excel无法找到home.html文件 [英] Office.js Apps: Excel cannot find the home.html file

查看:80
本文介绍了Office.js应用程序:Excel无法找到home.html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习如何编写Office.js应用程序.我确实使用了此处给出的示例. 清单文件QuarterlySalesReportManifest.xml中,我确实将SourceLocation元素的值更改为"\ MY-PC \ MySharedApp",这是"home.html"的位置.我还将QuarterlySalesReportManifest.xml放在另一个文件夹"\ MY-PC \ MyManifest"中,并将此文件夹添加为共享清单,其中包含清单,作为Excel中受信任的应用程序目录.

I'm trying to learn how to write Office.js apps. I did use the example given here. Manifest file, QuarterlySalesReportManifest.xml, I did change the value of SourceLocation element to "\MY-PC\MySharedApp" which is the location of the "home.html". I also placed QuarterlySalesReportManifest.xml in another folder, "\MY-PC\MyManifest" and added this folder as a share location that contains the manifest as a trusted app catalog in Excel.

当我尝试从Excel中运行该应用程序时,似乎可以识别QuarterlySalesReportManifest.xml,但是它搜索Home.js文件没有成功并给出错误消息

When I try to run the app from Excel it seem the QuarterlySalesReportManifest.xml is recognized but it searches for Home.js file without success and give an error message

Cannot find 'file://my-pc/MySharedApp/Home.html?_host_info=Exc...
Make sure the path or internet address is correct.

我不知道哪里做错了,因为输入的路径是我从Windows资源管理器获得的.有什么想法吗?

I do not know where am doing wrong because the path entered is as i got from Windows Explorer. Any idea on this?

推荐答案

尽管外接程序的清单可以托管在文件共享上(并因此通过文件"协议提供),但外接程序本身必须是通过http/https提供.我建议在开发过程中通过IIS在本地托管文件,或使用Visual Studio开发外接程序.

While the add-in's manifest can be hosted on a file share (and thus served through the "file" protocol), the add-in itself has to be served through http/https. I'd recommend either hosting the file locally through IIS during development or using Visual Studio for developing your add-in.

Gabriel Royer-MSFT Office可扩展性团队的开发人员

Gabriel Royer - Developer on the Office Extensibility Team, MSFT

这篇关于Office.js应用程序:Excel无法找到home.html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆