Transforming Fortran to Excel 2003 Programs

  • Thread starter Thread starter Pranas Rudys
  • Start date Start date
P

Pranas Rudys

What is the easiest way to change Fortran (or Basic for that matter)to
Excel 2003 Spreadsheet programs?

Are there any syntax or parsing programs available?

If not,
How are DO loops handled?
How are If statements done?

etc.
 
Hi

The easiest is simply to write a new code. And I'm afraid it's the only way.

a)
....
Do
Statements
...
Loop Until LogicalExpression
....

b)
....
Do While LogicalExpression
Statements
...
Loop

c)
....
If LogicalExpression Then Statement
....

d)
....
If LogicalExpression Then
Statements
...
ElseIf LogicalExpression2 Then
Statements
....
ElseIf LogicalExpression3 Then
Statements
...
....
Else
Statements
...
End If
....

e)
....
Variable=Iif(LogicalExpressin,TrueValue,FalseValue)
....

etc. Read VBA Help for a while, and ask after that more detailed questions -
we are happy to help.


Arvi Laanemets
 
What is the easiest way to change Fortran (or Basic for that matter)to
Excel 2003 Spreadsheet programs?

The easiest way is not to :). Create a DLL from the Fortran code and
call the DLL from Excel. If you don't know any Fortran, regard it as a
learning opportunity. There are free compilers available such as g77
for Fortran 77.

Also possible, but taking much more work and probably running slower,
is to convert the Fortran program to VBA and to call the VBA code from
Excel. You do realize that VBA is built into Excel?
 
(e-mail address removed) wrote in message
The easiest way is not to :). Create a DLL from the Fortran code and
call the DLL from Excel. If you don't know any Fortran, regard it as a
learning opportunity. There are free compilers available such as g77
for Fortran 77.

Also possible, but taking much more work and probably running slower,
is to convert the Fortran program to VBA and to call the VBA code from
Excel. You do realize that VBA is built into Excel?

First: Yep! Old Fortran Programmer. But Creating DLL are a step out
now.
I have converted several GW Basic, QBasic and Quick Basic Programs to
Excel VBA by pasting the code directly into an Excel VBA Procedure.
Then assiging the input/output statements to cells on the spreadsheet
and using variables assigned to their ranges. It is sort of slow. I
was looking for an automatic way to do it.

And Oh yes I do code in VBA all the time.

Fortran programs are another matter. The syntax of the program is
slightly different.
 
How do you directly paste the code into VBA. I have tried and I am having problems copying the code from Quick Basic and pasting it into VBA.
 
Back
Top