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?
Asked
Active
Viewed 808 times
0
-
Have you looked into using Microsoft.Office.Interop? – Tebc Feb 05 '13 at 16:31
-
yes. That was my first stop. xlApp = CreateObject("Excel.Application") does not work. – chaltahai Feb 05 '13 at 18:36
-
file is on a fileshare. not on the web server. – chaltahai Feb 05 '13 at 19:33
-
You may be running into permission issues, but you'd have to prove or disprove that thought. Here's an MSDN link to that regard: http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/4297f8d7-3552-4e42-b00e-751b0764b5c2/ – Tebc Feb 05 '13 at 20:06
-
not a permission issue, but thank you for the link, I will try the suggestions posted on the link u shared. Thanks! – chaltahai Feb 05 '13 at 20:33
1 Answers
0
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')"

chaltahai
- 117
- 10