是否可以从asp .net页面启动.xlsm文件? [英] Is it possible to launch a .xlsm file from an asp .net page?

查看:239
本文介绍了是否可以从asp .net页面启动.xlsm文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从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文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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