Hello All, 我们为excel提供了一个自定义com加载项。我们重写了excel的workbook_open事件,以反序列化存储在activeX控件中的自定义数据。但是,如果工作簿包含一个宏,在打开工作簿时,它首先运行宏,然后它调用Workbook_open()函数中的方法。我们在Excel 2007和Excel 2010中都观察到这种情况。 如果工作簿包含宏,则根据excel行为和用户显示安全警告允许宏运行然后我们只想反序列化我们的数据。 如果有人遇到同样的问题,请分享一下这个问题。 在此先感谢!!! 问候, Vieer
Hello All, We have a custom com add-in for excel. We are overriding the workbook_open event of excel to de-serialize our custom data which is stored in the activeX control. But, if a workbook contains a macro, while opening the workbook it first runs the macro after that it calls our methods in the Workbook_open() function. This behavior we observed in both Excel 2007 and Excel 2010. We want to display the security warning to the user if a workbook contains macro as per excel behavior and if user allows macro to run then only we want to de-serialize our data. Please share something on this issue, if anybody faced same kind of issue. Thanks in Advance!!! Regards, Vieer
推荐答案请参阅 msdn.microsoft/en-us/library/microsoft.office.interop.excel.workbooks.open(v = office.11)的.aspx [ ^ ]。
更多推荐
在打开工作簿时需要控制宏的运行
发布评论