This question already has an answer here:
这个问题已经有了答案:
- Microsoft Excel ActiveX Controls Disabled? 11 answers
- 微软Excel ActiveX控件禁用?11个答案
One of the users of our iGrid ActiveX grid control needs to insert it directly into an MS Excel sheet, but they have not managed to do that - the "Cannot insert object" error is generated all the time. We can also reproduce this problem on our test pc under Win7 64-bit and MS Office 2010 32-bit.
我们的iGrid ActiveX网格控件的一个用户需要将它直接插入到MS Excel表中,但是他们没有做到这一点——“不能插入对象”的错误一直都在生成。我们还可以在Win7 64位和MS Office 2010 32位的测试pc上重现这个问题。
This COM control is properly registered in the OS and can be added to VBA UserForms and other apps, but we cannot do that for an Excel sheets. It seems, it's a common problem for ActiveX's - even legacy ones like Microsoft DataGrid Control 6.0. After searching for a solution for a significant amount of time, we concluded it is a security setting in MS Office. So the question can be formulated as the following: How to enable the usage of specific ActiveX controls in MS Office?
这个COM控件在操作系统中正确注册,可以添加到VBA UserForms和其他应用程序中,但是我们不能对Excel表这样做。这似乎是ActiveX的一个常见问题——甚至是像Microsoft DataGrid控制6.0这样的遗留系统。在寻找了大量时间的解决方案后,我们得出结论,它是MS Office中的安全设置。因此问题可以这样表述:如何在MS Office中启用特定的ActiveX控件?
Below are the related resources we found and which might help.
下面是我们找到的相关资源,它们可能会有所帮助。
First of all, Microsoft states that
首先,微软说
Not all ActiveX controls can be used directly on worksheets; some can be used only on Microsoft Visual Basic for Applications (VBA) UserForms. When you work with these controls, Excel displays the message Cannot insert object if you try to add them to a worksheet.
并不是所有ActiveX控件都可以直接在工作表上使用;有些只能在Microsoft Visual Basic中用于应用程序(VBA)用户表单。当您使用这些控件时,如果您试图将其添加到工作表中,则Excel将显示无法插入对象的消息。
Does anybody know what missing features might prevent an ActiveX control from being insertable into Excel sheets?
有人知道缺少哪些特性可能会阻止ActiveX控件被插入到Excel表中吗?
Second, there is a known issue with EXD files used to cache ActiveX controls. But we've checked - that's not our case.
其次,对于用于缓存ActiveX控件的EXD文件存在一个已知的问题。但我们已经检查过了,这不是我们的情况。
Third, there are two technical articles from Microsoft which explain how to "fix" some ActiveX security problems for ActiveX's using the registry:
第三,微软有两篇技术文章解释了如何“修复”ActiveX使用注册表的一些安全问题:
PRB: Error Message "Cannot insert object" in Excel
http://support.microsoft.com/default.aspx?scid=kb;EN-US;171280
PRB:在Excel http://support.microsoft.com/default.aspx?
Cannot insert certain scriptable ActiveX controls into Office 2013 documents
http://support.microsoft.com/kb/2793374
无法将某些可脚本化的ActiveX控件插入Office 2013文档http://support.microsoft.com/kb/2793374
It seems, this also does not help - or we just did something wrong.
这似乎也没有帮助——或者我们只是做错了什么。
And the last thing we tried - the Office Trust Center. Allowing the usage of all ActiveX's without any restrictions and adding the folder with our iGrid ActiveX to the list of trusted location didn't help anyhow.
我们最后试过的是办公室信托中心。允许不受任何限制地使用所有ActiveX,并将带有iGrid ActiveX的文件夹添加到可信位置列表中,无论如何都无济于事。
4 个解决方案
#1
13
From Technet Forum
从技术论坛
Close Excel.
Excel。
Start Windows Explorer.
启动Windows资源管理器。
Select your system drive (usually C:)
选择您的系统驱动器(通常是C:)
Use the Search box to search for *.exd
使用搜索框搜索*.exd
Delete all the files it finds.
删除它找到的所有文件。
Start Excel again.
重新开始Excel。
#2
2
We have had a similar problem in the past with an ActiveX control that we insert on an Excel sheet from our COM Add-in, and you seem to have touched on two of the items (below) to solve it. The following solves the problem most* of the time.
我们在过去也遇到过类似的问题,我们将ActiveX控件插入到COM外接程序的Excel表中,您似乎已经接触了其中的两个条目(如下)来解决它。下面的例子大多数时候都能解决这个问题。
From Excel 2010: File ribbon; Options; Trust Center; Trust Center Settings (button)...;
来自Excel 2010: File ribbon;选项;信任中心;信任中心设置(按钮)…;
- Add-ins: UNCHECK 'Require Application Add-ins to be signed by Trusted Publisher'.
- 外接程序:不检查“需要由受信任的发布者签名的应用程序外接程序”。
- Macro Settings: Ensure it is not disabling all Macros without notification. It is OK if it is set to 'Disable all Macros with notification'.
- 宏设置:确保它没有在没有通知的情况下禁用所有宏。如果它被设置为“禁用所有带有通知的宏”,则没有问题。
- ActiveX Settings: Ensure it is not disabling all controls without notification. It is OK is it is set to 'Prompt me before enabling all controls with minimal restrictions'. THIS WAS THE MAIN CAUSE.
- ActiveX设置:确保在没有通知的情况下没有禁用所有控件。它被设置为“在启用所有限制最小的控件之前提示我”是可以的。这是主要的原因。
- Trusted Locations: Add the directory of your control.
- 可信位置:添加控件的目录。
Note that some of these are usually not necessary if InstallShield properly registered the containing program (e.g. dll). Also notice that we still allow prompting (probably a good idea to pretect your liability). That has not caused us a problem.
请注意,如果InstallShield正确地注册了包含的程序(例如dll),这些通常是不必要的。还请注意,我们仍然允许提示(可能是个好主意,以保护您的责任)。这并没有给我们带来问题。
- However, the reason I am here is that we have one case (out of 200 customers) where the above did NOT work and this just started happening a week ago (it was working for the last 9 months). I am assuming Excel corruption at this point since there were no changes. We have otherwise tried everything. Did you resolve yours?
- 然而,我在这里的原因是,我们有一个案例(200个客户中),上面没有工作,而这只是一个星期前开始的(它在过去的9个月里一直在工作)。我假设此时Excel已经损坏,因为没有变化。我们什么都试过了。你解决你的吗?
#3
1
This solved it for me:
这就解决了我的问题:
Go to the following registry:
到下列登记处:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\COM Compatibility{8856F961-340A-11D0-A96B-00C04FD705A2}
HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \微软办公室\ \ 15.0 \常见\ COM兼容性{ 8856 f961 - 340 - 11 - d0 a96b - 00 - c04fd705a2 }
Then set the value data from 400 to 0.
然后将值数据从400设置为0。
Hope it helps.
希望它可以帮助。
Sorry forgot to give credit for the one who found it. Here. http://social.technet.microsoft.com/Forums/office/en-US/7942c472-2b5a-4005-888f-43ece2a5800a/adding-web-browser-control-to-excel-2013?forum=officeitpro&prof=required
对不起,忘了给找到它的人授信。在这里。http://social.technet.microsoft.com/forums/office/en us/7942c472 - 2 b5a - 4005 - 888 - f - 43 ece2a5800a/adding - web浏览器-控制- excel - 2013 ?forum=officeitpro&prof=required
#4
0
I suffered from this problem the other day and went back to basics with my solution as I don't like the idea of editing the registry.
前几天我遇到了这个问题,我回到了基本的解决方案,因为我不喜欢编辑注册表的想法。
I solved the problem by simply re-registering the main types of controls I use i.e. Command buttons, Comboboxes, Listboxes, Spinners etc.
我只需重新注册我使用的主要控件类型,例如命令按钮、组合框、列表框、旋转器等,就可以解决这个问题。
To do this go into the Developer tab and click on Insert (a control)
要做到这一点,请进入Developer选项卡并单击Insert(一个控件)
By choosing 'More Controls', in the bottom right-hand corner of the Activex Controls, you can re-register any controls that you might need.
通过选择“更多的控件”,在Activex控件的右下角,您可以重新注册您可能需要的任何控件。
#1
13
From Technet Forum
从技术论坛
Close Excel.
Excel。
Start Windows Explorer.
启动Windows资源管理器。
Select your system drive (usually C:)
选择您的系统驱动器(通常是C:)
Use the Search box to search for *.exd
使用搜索框搜索*.exd
Delete all the files it finds.
删除它找到的所有文件。
Start Excel again.
重新开始Excel。
#2
2
We have had a similar problem in the past with an ActiveX control that we insert on an Excel sheet from our COM Add-in, and you seem to have touched on two of the items (below) to solve it. The following solves the problem most* of the time.
我们在过去也遇到过类似的问题,我们将ActiveX控件插入到COM外接程序的Excel表中,您似乎已经接触了其中的两个条目(如下)来解决它。下面的例子大多数时候都能解决这个问题。
From Excel 2010: File ribbon; Options; Trust Center; Trust Center Settings (button)...;
来自Excel 2010: File ribbon;选项;信任中心;信任中心设置(按钮)…;
- Add-ins: UNCHECK 'Require Application Add-ins to be signed by Trusted Publisher'.
- 外接程序:不检查“需要由受信任的发布者签名的应用程序外接程序”。
- Macro Settings: Ensure it is not disabling all Macros without notification. It is OK if it is set to 'Disable all Macros with notification'.
- 宏设置:确保它没有在没有通知的情况下禁用所有宏。如果它被设置为“禁用所有带有通知的宏”,则没有问题。
- ActiveX Settings: Ensure it is not disabling all controls without notification. It is OK is it is set to 'Prompt me before enabling all controls with minimal restrictions'. THIS WAS THE MAIN CAUSE.
- ActiveX设置:确保在没有通知的情况下没有禁用所有控件。它被设置为“在启用所有限制最小的控件之前提示我”是可以的。这是主要的原因。
- Trusted Locations: Add the directory of your control.
- 可信位置:添加控件的目录。
Note that some of these are usually not necessary if InstallShield properly registered the containing program (e.g. dll). Also notice that we still allow prompting (probably a good idea to pretect your liability). That has not caused us a problem.
请注意,如果InstallShield正确地注册了包含的程序(例如dll),这些通常是不必要的。还请注意,我们仍然允许提示(可能是个好主意,以保护您的责任)。这并没有给我们带来问题。
- However, the reason I am here is that we have one case (out of 200 customers) where the above did NOT work and this just started happening a week ago (it was working for the last 9 months). I am assuming Excel corruption at this point since there were no changes. We have otherwise tried everything. Did you resolve yours?
- 然而,我在这里的原因是,我们有一个案例(200个客户中),上面没有工作,而这只是一个星期前开始的(它在过去的9个月里一直在工作)。我假设此时Excel已经损坏,因为没有变化。我们什么都试过了。你解决你的吗?
#3
1
This solved it for me:
这就解决了我的问题:
Go to the following registry:
到下列登记处:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\15.0\Common\COM Compatibility{8856F961-340A-11D0-A96B-00C04FD705A2}
HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \微软办公室\ \ 15.0 \常见\ COM兼容性{ 8856 f961 - 340 - 11 - d0 a96b - 00 - c04fd705a2 }
Then set the value data from 400 to 0.
然后将值数据从400设置为0。
Hope it helps.
希望它可以帮助。
Sorry forgot to give credit for the one who found it. Here. http://social.technet.microsoft.com/Forums/office/en-US/7942c472-2b5a-4005-888f-43ece2a5800a/adding-web-browser-control-to-excel-2013?forum=officeitpro&prof=required
对不起,忘了给找到它的人授信。在这里。http://social.technet.microsoft.com/forums/office/en us/7942c472 - 2 b5a - 4005 - 888 - f - 43 ece2a5800a/adding - web浏览器-控制- excel - 2013 ?forum=officeitpro&prof=required
#4
0
I suffered from this problem the other day and went back to basics with my solution as I don't like the idea of editing the registry.
前几天我遇到了这个问题,我回到了基本的解决方案,因为我不喜欢编辑注册表的想法。
I solved the problem by simply re-registering the main types of controls I use i.e. Command buttons, Comboboxes, Listboxes, Spinners etc.
我只需重新注册我使用的主要控件类型,例如命令按钮、组合框、列表框、旋转器等,就可以解决这个问题。
To do this go into the Developer tab and click on Insert (a control)
要做到这一点,请进入Developer选项卡并单击Insert(一个控件)
By choosing 'More Controls', in the bottom right-hand corner of the Activex Controls, you can re-register any controls that you might need.
通过选择“更多的控件”,在Activex控件的右下角,您可以重新注册您可能需要的任何控件。