Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening and reading an Excel file with Fortran 1

Status
Not open for further replies.

doggod22

Technical User
Jun 16, 2010
4
US
I have a data file in Excel that I need to be able to input the data for processing in another f95 program. The data is in the following form:

Distance Model01 Model02 Model03 Model04 Model05 Model06
1 15.23 24.32 43.02 20.56 34.58 56.21
2 43.23 21.45 87.21 43.21 58.21 02.57

and so on for a couple thousand rows.
What would be the best method for accomplishing this?
 
Open the excel sheet
Click on Save As...
On the "Save As Type" select Text (tab delimited) *.txt

You now have the data in text form.

After opening the file, you can read the data as
Code:
read (filechannel, *) distance, (model(ii), ii = 1, 6)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top