how can i run excel/word macro to C# .net programs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have macro in excel sheet in which data is sorted and some other functions.
i want to use that macro in C# .net
how can i use that.
 
What exactly doy ou mean by using the macro in C#.net? Do you want to
activate or run the macro in the Excel workbook from C#, or do you
want to use the functionality of the macro in your C# program?
 
yes, i want both
1) Activate and run the macro in the Excel workbook from C#,
2) Use the functionality of the macro in your C# program?
please answer whatever way you understand instead of re-asking. :(
 
You can use the Run method to run an existing macro. E.g.,

XLAppRef.Run "Book1.xls!TheMacroName"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top