从Visual Studio调试加载excel插件xll [英] loading a excel addin xll from visual studio debug

查看:357
本文介绍了从Visual Studio调试加载excel插件xll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个excel插件的调试版本,将其称为myaddin.xll.当我打开excel实例并将myaddin.xll添加到它时,我得到了预期的结果.但是当我从内部点击调试时 Visual Studio环境中,myaddin.xll尝试打开并给出此程序不能处于dos模式"错误.

i create a debug version of an excel addin lets call it myaddin.xll. when i open an instance of excel and add myaddin.xll to it i get the expected result. but when i hit debug from within visual studio environment the myaddin.xll tries to open and gives a "this program cannot be in dos mode" error.

对于我开发的其他Excel插件,我没有这个问题.对于此特定插件,此问题突然发生.当缺少某些东西时,通常会发生"dos模式..."错误.显然,该插件没有任何缺少的组件,因为它在excel中打开.但是当我尝试从Visual Studio中打开时,某些组件丢失了.我的问题是如何找出导致错误的原因并进行修复.

for other excel addin i have developed i do not have this problem. this problem is suddenly occuring for this particular addin. "dos mode..." error usually happens when something is missing. clearly the addin does not have any missing component because it opens in excel. but the some component gets missing when i try to open from within visual studio. my question is how to i figure out what is causing the error and fix it.

当我单击debug时,excel会打开,然后弹出一个窗口您的文件myaddin.dll的格式与文件扩展名指定的格式不同...."当我单击ok弹出该对话框时,我得到了垃圾字符在电子表格中.

when i hit debug excel opens up and then gives a pop up "you file myaddin.dll is in a different format than specified by the file extension...." when i hit ok to that pop up i get garbage characters in the spreadsheet.

推荐答案

您需要将Visual Studio配置为:1)运行Excel 2)加载.xll并3)添加您的dll依赖项路径(右键单击projet-"Configuration属性"->调试"):

You need to Configure Visual Studio to : 1) run Excel 2) load your .xll and 3) add your dll dependencies path (right click projet-"Configuration Properties" -> "Debug") :

-别忘了将dll的扩展名(配置属性"->常规")切换为.xll.

-Don't forget to switch the extension ("Configuration Properties" -> "General) of the dll to .xll.

-不要错过Govert(加载来自Visual Studio调试的excel插件xll )关于x64位与32位的评论.

-Don't miss the Govert (loading a excel addin xll from visual studio debug) comment regarding x64bit versus 32 bits.

这篇关于从Visual Studio调试加载excel插件xll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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