Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Can someone tell me how to access excel vba macro in c# using EPPLUS? OR tell me what are all the other ways to access vba macros in c#. Basically I want to get the macro vba method input parameters as per the given method name. I have used Microsoft.vbe.interop(VBIDE) to access vba components but getting 8001010a ICLASSFACTORY COM error

What I have tried:

Tried using VBIDE but getting com exceptions when I use it
Posted
Updated 3-Jun-19 8:50am

1 solution

FileInfo fileInfoTemplate = new FileInfo(arquivo);
OfficeOpenXml.ExcelPackage excel = new ExcelPackage(fileInfoTemplate);

foreach (var worksheet in excel.Workbook.Worksheets)
{
foreach (var item in excel.Workbook.VbaProject.Modules)
{
...
}
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900