Excel JS加载项可在Excel中使用,但不能在Excel Online中使用 [英] Excel JS Add-In works in Excel but not Excel Online

查看:197
本文介绍了Excel JS加载项可在Excel中使用,但不能在Excel Online中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用WoodGrove费用趋势示例构建了一个Excel JS任务窗格加载项,并已验证它可以在我的计算机上的Excel 2016中正常运行.但是,当我转到Excel Online并尝试添加加载项(通过从计算机上载清单)时,出现您的加载项清单无效".

I've built an Excel JS Task Pane add-in using the WoodGrove Expense Trends sample and have validated that it runs correctly in Excel 2016 on my machine. However, when I go to Excel Online and try to add the add-in (via uploading the manifest from my machine), I get "Your add-in manifest is not valid."

我不确定此清单对我的机器有效,但在Excel Online中无效.

I'm not sure what it is about this manifest that's valid on my machine but not in Excel Online.

任何人以前都遇到过这个问题或有任何诊断想法?这有点类似于将我的头撞到墙上.

Anyone encountered this before or have any diagnosis ideas? It's somewhat akin to banging my head into a wall at this point.

推荐答案

通过查看清单进行猜测,我猜想是通过在我的计算机上的Excel 2016中正确运行",您的意思是可以"F5"在Visual Studio中,它可以正常运行.是真的吗?

Taking a guess from looking at the manifest, I would guess that by "runs correctly in Excel 2016 on my machine", you mean that you can "F5" in Visual Studio and it runs correctly. Is that true?

假设我的假设是正确的……之所以可以通过Visual Studio在桌面上运行,是因为VS进行了特殊的F5流程,在该流程中,它自动将相对的Web路径替换为旋转的IIS位置.但是清单本身实际上并不有效",因为它没有真实的URL,就像"〜remoteAppUrl /App/Auth/About.html"而不是" https://localhost:3000 /App/Auth/About.html".

Assuming my assumption is true... the reason it works on desktop through Visual Studio is that VS does a special F5 process where it automatically substitutes the relative web paths with the spun-up IIS location. But the manifest itself is not actually "valid" in that it doesn't have real URLs -- just things like "~remoteAppUrl/App/Auth/About.html" instead of "https://localhost:3000/App/Auth/About.html".

您可以做两件事:

  1. 由于您已经在Visual Studio中,因此,并且如果您有Office 365 for Business租户,则可以使用实际的内置功能在Excel Online中进行调试.只需打开清单项目的属性窗格,然后将开始操作设置为Internet Explorer或Chrome.在

  1. Since you already are in Visual Studio, and if you have an Office 365 for Business tenant you could use the actual built-in feature for debugging in Excel Online. Just open the properties pane for the manifest project, and set the start action to Internet Explorer or Chrome. There is a brief mention of this on https://dev.office.com/docs/add-ins/get-started/create-and-debug-office-add-ins-in-visual-studio, search for "start action".

作为一种适用于其他主机(Word,PPT)且不需要Office 365商业版帐户(常规的OneDrive使用者需要)的更通用的方法,请按照我的解答中列出的步骤进行操作 https://stackoverflow.com/a/33155794/678505 .

As a more generic approach that works for other hosts (Word, PPT), and that doesn't require an Office 365 for Business account (regular OneDrive consumer would do), follow the steps outlined on my answer at https://stackoverflow.com/a/33155794/678505.

这篇关于Excel JS加载项可在Excel中使用,但不能在Excel Online中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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