Software Archive
Read-only legacy content
17061 Discussions

Implement an interface with Fortran

wfroese
Beginner
439 Views
I'm looking to implement the IDExtensibility2 interface from within my Fortran code. This will allow me to make a COM addin for Excel (see http://msdn.microsoft.com/library/techart/COMAddins.htm). The problem is I don't know how to implement an interface with Fortran or C++. Has anyone else tried this? I've read the manuals and guides and I don't think that this is covered.
0 Kudos
4 Replies
Intel_C_Intel
Employee
439 Views
Hi,

With VC++ 6.0, you can do this with Class View's popup menu, Implement Interface (which basicly uses #import). With VB, it's even easier with the Implements keyword. With CVF 6.5, I'm pretty sure you'll have to re-implement the interface by hand using the COM Server Wizard - there is no support for implementing interfaces described in existing type libraries.

-John
0 Kudos
rahzan
Novice
439 Views
John,
I'm trying to find a way to simply provide fortran function calls from excel where it takes column and parameters as input and populates columns in Excel. Is this IDE extensiblity the same thing?

If so does v 6.6 any better at this?

Tim
0 Kudos
rahzan
Novice
439 Views
Wayne,
Did you ever figure this IDEextensiblity thing out?

Tim
0 Kudos
wfroese
Beginner
439 Views
I wanted to add my Fortran functions for use in Excel directly without the use of an Addin workbook/VBA intermediary. VB would not allow you to add a function that you could reference in a worksheet cell without it being called by VBA code in a workbook or addin. This led to some problems (all users had to have the same file location etc or it had to have references updated when they shared their work etc). I wondered if Fortran could do this but I never figured out implementing an interface in Fortran. I have access to C++ but I don't know the language so that is no help. What I am going to do is wait until Visual Studio.NET is released and see if VB now can add a function without the workbook/VBA mess. Then I will write a VB wrapper for my Fortran and the world will be happy. If you do find out how to implement interfaces, then I'd be happy to hear it. I was working with the COM wizard for Fortran but I don't see how it could do it and I've found no help online yet.
0 Kudos
Reply