Excel add-in
C#
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, I have this simple Excel add-in project based on the standard VS template, however, I cannot call the below test() function from Excel VBA.
\[Guid("9E88FA9A-4E7D-4bba-8D94-439BFA2B0AEC")\] \[ClassInterface(ClassInterfaceType.AutoDual)\] \[ComVisible(true)\] public class MyFunctions { public void test() { Microsoft.Office.Interop.Excel.Application xlsApp = new ApplicationClass(); Worksheet ws = (Worksheet)xlsApp.ActiveSheet; ws.Cells\[1, 1\] = "Edited by C#"; }
Please help, Thanks.
-
Hi, I have this simple Excel add-in project based on the standard VS template, however, I cannot call the below test() function from Excel VBA.
\[Guid("9E88FA9A-4E7D-4bba-8D94-439BFA2B0AEC")\] \[ClassInterface(ClassInterfaceType.AutoDual)\] \[ComVisible(true)\] public class MyFunctions { public void test() { Microsoft.Office.Interop.Excel.Application xlsApp = new ApplicationClass(); Worksheet ws = (Worksheet)xlsApp.ActiveSheet; ws.Cells\[1, 1\] = "Edited by C#"; }
Please help, Thanks.
Please state why you can't call the function. Any error message?
The difficult we do right away... ...the impossible takes slightly longer.