Interface between Excel and Fortran

Is there away in which I can input data rom an Excel worksheet to FORTRAN
humbertopetreiAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RamanhpCommented:
check this out >> 

http://newtonexcelbach.wordpress.com/2008/12/04/linking-excel-to-fortran-2/

alternate way recommended is to convert xls to csv and then import

http://www.physicsforums.com/showthread.php?p=2209720
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dcesariCommented:
I agree with the suggestion to pass through a csv file for interfacing to Fortran, here I propose a Fortran module of mine, freely distributable with GPL license, that can read (and write) csv files in a modern object-oriented way, allowing to correctly read records as CHARACTER, INTEGER and REAL variables, including quoted records:

http://www.webalice.it/o.drofa/davide/csv_class.tar.gz

a program for reading a csv file with this module would look more or less like the example attached.
Good luck.
PROGRAM csv_example
USE csv_class
 
CHARACTER(LEN=1024) :: line
CHARACTER(LEN=16) :: cfield
REAL :: rfield
INTEGER :: ifield
TYPE(csv_record) :: csv
INTEGER :: iost
 
OPEN(10,file='my.csv')
DO WHILE(.TRUE.)
  READ(un,"(A)",iostat=iost) line
  IF (iost /= 0) EXIT
  CALL init(csv, line)
  CALL csv_record_getfield(csv, cfield) ! get a character field
  CALL csv_record_getfield(csv, ifield) ! get an integer field
  CALL csv_record_getfield(csv, rfield) ! get a real field
  CALL delete(csv)
  PRINT*,cfield,rfield
ENDDO
CLOSE(10)
 
END PROGRAM csv_example

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Software

From novice to tech pro — start learning today.