Discussion Locked

Excel Macro From an ASP webpage

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi guys i am trying to open and display excel file, and run a macro that accepts parameters.

I've tried all i can think of, creating and object and it just does not work.

So now i am opening the file witha normal hyperlink, but how can i run a macro that needs to recieve paramaters.

can you guys help out

2 replies

by juergen hartl

Set ex = server.CreateObject("Excel.Application")
Set wbs = ex.Workbooks
wbs.Open( path/to/excelworkbook.xls)
'ex.Visible=true
ex.Run "Makroname"
...

by bschaettle

This is actually a little-known "feature" but it works. Instead of hyperlinking directly to the Excel file, hyperlink to a Windows SHORTCUT that points to the Excel file. This will cause the file to be opened using the Excel application instead of the Excel Viewer.

click here

This discussion is closed to new replies.