问题描述
我需要从asp .net(VB)页面中启动.xlsm文件。我尝试了很多方法,包括EPPlus,但似乎没有任何效果。有什么想法吗?
I need to launch a .xlsm file from within an asp .net (VB) page. I tried a bunch of things, including EPPlus, but nothing seems to work. Any thoughts?
推荐答案
好!因此,在敲打键盘两天后,此方法起作用了,我将代码添加到OnClientClick事件中,如下所示,该事件启动了异常的.xlsm文件!
OK! So, after two days of banging my head on the keyboard, this is what worked, I added code to the OnClientClick event as follows which launched the freaking .xlsm file!
OnClientClick = javascript:MyObject = new ActiveXObject('WScript.Shell'); MyObject.Run('file:/// C:/MacroEnabledFile.xlsm')
OnClientClick="javascript: MyObject = new ActiveXObject('WScript.Shell'); MyObject.Run('file:///C:/MacroEnabledFile.xlsm')"
这篇关于是否可以从asp .net页面启动.xlsm文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!