- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wrote a fortran program to calculate the moments and shear forces in a 2-span beam under moving forces.
I first tried with VBA but it took too long to run.
I want to pass the input from excel to fortran and get the results back.
I did some research but there is little to be found on the subject.
I tried with a simple routine i.e. adding two numbers an compiled the fortran source to a DDL. But after that I’m stuck. I found an example program on chat GPT but it doesnt work.
https://chatgpt.com/c/58715b3e-09a3-4d9b-9e5c-db20fe33d5675
Roger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have Excell Office365. It's 64 bit.
I recompiled with "ifx Fcall.f90 /dll /libs:static /threads " and it runs now without a problem.
Roger
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is an example of Excel-Fortran in the samples bundle, under MixedLanguage. I would not trust anything ChatGPT tells you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
The example is for win32. I recompiled the dll as x64 and added the PtrSafe attribute in VBA.
But now I get VBA Run-time error '53' File not found: c:\temp\Fcall.dll allthough the dll is there.
I suppose this is a very generic error and could actually mean anything.
Roger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You would need to be using 64-bit Excel to use a 64-bit DLL. It's been a while since I looked at this, but let me see if I can make it work for 64-bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have Excell Office365. It's 64 bit.
I recompiled with "ifx Fcall.f90 /dll /libs:static /threads " and it runs now without a problem.
Roger

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page