问题
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?
回答1:
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')"
来源:https://stackoverflow.com/questions/14710848/is-it-possible-to-launch-a-xlsm-file-from-an-asp-net-page