在现有工作簿上调试由JavaScript API编写的Excel加载项 [英] Debug Excel add-in written by JavaScript API on an existing workbook

查看:70
本文介绍了在现有工作簿上调试由JavaScript API编写的Excel加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用JavaScript API for Excel开发Excel加载项.

我已经可以运行一些示例,在 Visual Studio 下启动调试.每次启动调试时,它都会打开一个新的Excel工作簿.

但是,大多数时候,我需要在现有工作簿上调试外接程序.例如,

解决方案

来自

在那之后,只需按F5键(开始调试),您应该就可以开始使用

.

〜MSFT Office可扩展性团队的开发人员Michael Zlatkovsky

I am trying to develop an Excel add-in by using JavaScript API for Excel.

I can already make some samples run, launch debugging under Visual Studio. Every time when i launch debugging, it opens a new workbook of Excel.

However, most of time, I need to debug an add-in on an existing workbook. For instance, here is an add-in sample, which opens a blank workbook and adds blank sheets to it. However, I want it to add blank sheets to an existing (opened) workbook. Does anyone know what I should set to debug it on an existing (opened) workbook? Should I modify some lines of code?

Edit 1:

解决方案

From http://dev.office.com/docs/add-ins/get-started/create-and-debug-office-add-ins-in-visual-studio

To use an existing document to debug the add-in

  • In Solution Explorer, choose the add-in project folder.

    Note Choose the add-in project and not the web application project.

  • On the Project menu, choose Add Existing Item.

  • In the Add Existing Item dialog box, locate and select the document that you want to add.

  • Choose the Add button to add the document to your project.

  • In Solution Explorer, open the shortcut menu for the project, and then choose Properties.

  • The property pages for the project appear.

  • In the Start Document list, choose the document that you added to the project, and then choose the OK button to close the property pages.

Here is the resulting configuration that you should see:

After that just press F5 (start debugging), and you should be good to go.

~ Michael Zlatkovsky, developer on Office Extensibility team, MSFT

这篇关于在现有工作簿上调试由JavaScript API编写的Excel加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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