如何在Word和excel的在线版本中测试Office加载项? [英] How to test Office Add-ins in the online version of Word and excel?

查看:148
本文介绍了如何在Word和excel的在线版本中测试Office加载项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Office JavaScript开发任务窗格Office加载项. Visual Studio中的API .当您运行该应用程序时,它将在Office的桌面客户端版本中运行.

I am developing an Task Pane Office Add-in using the Office JavaScript APIs in Visual Studio. When you run the application it runs in the desktop client version of Office.

Office Store要求说明

The Office Store requirements states

您的Office外接程序必须具有受Office 2013和Office Online支持的操作系统,浏览器和设备的全部功能.

Your Add-in for Office must be fully functional with the supported operating systems, browsers, and devices for Office 2013 and Office Online.

所以我也需要在Office在线版本中进行测试.

So I need to test it in the Office online versions too.

问题是我无法找到在Word/Excel/Powerpoint Online中加载应用程序并对其进行测试的方法,并且我也没有SharePoint设置,可以在其中发布应用程序对其进行测试,然后将其提交给应用商店.

The problem is I am unable to find a way to load the application in Word/Excel/Powerpoint Online and test it and I also dosen't have a SharePoint setup where I can publish the app test it and then submit it the app store.

任何帮助将不胜感激.

Any help will be much appreciated.

推荐答案

要回应Massimo的上述回答:创建O365开发站点是最简单的方法.并且,假设您使用的是Visual Studio,则开始操作"属性将为您部署该应用程序到Excel Online文档中(该文件有些隐藏,但非常方便!),如果您进行设置,您甚至应该能够达到断点Internet Explorer中的开始操作"!

To echo Massimo's answer above: Creating the O365 Dev Site is the easiest way to go. And, assuming you're using Visual Studio, the "Start Action" property will deploy the app for you into an Excel Online document (it's somewhat hidden, but super super handy!) You should even be able to hit breakpoints, if you set Internet Explorer in the "Start Action"!

对于Word&在线PowerPoint,或者如果您不使用VS,请参见调试add- Office Online中的插件

For Word & PowerPoint online, or if you're not using VS, see Debug add-ins in Office Online

注意:如果您关注上面的文章,那么有关本地主机URL的一些说明(步骤2):对于使用Visual Studio的用户,而不是手动编辑XML,您可以使用发布"获取准备上传清单的功能.为此:

Note: If you're following the article above, a few clarifications regarding the localhost URL (step #2): For those who are using Visual Studio, rather than editing the XML manually, you can instead use the "publishing" functionality to get a ready-to-upload manifest. To do this:

  1. 右键单击包含清单的项目,然后选择发布"
  2. 在个人资料的当前个人资料"下,选择创建新的个人资料",并为其命名,例如本地发布"
  3. 选择打包应用程序"按钮(如果只想对本地计算机进行测试,则跳过部署Web项目"按钮),然后输入本地主机部署的URL(例如,类似" https://localhost:44300 ).单击完成",等待几秒钟,清单的已发布副本将出现在Windows资源管理器中.
  1. Right-click on the project containing the manifest and choose "Publish"
  2. Under Profile's "current profile", choose "Create new profile" and give it a name like "local publish"
  3. Choose "package the app" button (skipping over the "deploy your web project" button, if you just want to test against a local machine), and enter the URL of your localhost deployment (e.g., something like "https://localhost:44300"). Click "finish", wait a few seconds, and a published copy of your manifest will appear in Windows Explorer.

要找出VS用于本地运行外接程序的URL,最简单的方法是通过Web项目的属性"面板,查看SSL URL属性

To find out the URL that VS uses for locally running the add-in, the easiest way is via the Properties pane of the web project, looking at the SSL URL property

继续按照本文中的其余步骤进行操作(当然,当您在线尝试从Office加载项时,请确保该加载项是VS的F5版本)在本地主机上运行).或使用与上述相同的过程,但稍作修改后,首先发布到免费的Azure网站上,然后指向该站点.

Continue following the article for the rest of the steps (and of course, make sure that the add-in is F5-ed from VS when you try out the add-in from Office online, to make sure that your site is running on localhost). Or use the same procedure as above, but slightly modified, to first publish to a free azure website, and point to that, instead.

这篇关于如何在Word和excel的在线版本中测试Office加载项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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