Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Opening Excel File

hhadavi
Beginner
459 Views

I want to open an excel file to read and write to. Does anyone have any idea how to do it? I appreciate for the help.

Thanks

0 Kudos
5 Replies
Steven_L_Intel1
Employee
459 Views
An Excel sample called Autodice is provided with the product, under Samples\en_US\Fortran\COM.
0 Kudos
Arjen_Markus
Honored Contributor I
459 Views
An alternative might be to approach the Excel file (or an Access database) via ODBC.
My Flibs project (http;/flibs.sf.net) has a Fortran module that can do so.

Mind you: I am not claiming that that is a better method, I am just presenting an alternative for what
ever it is worth :).

Regards,

Arjen
0 Kudos
hhadavi
Beginner
459 Views
Hi Steve,

Thank you for your response. I looked at the Samples folde under the Microsoft Visual Studio 10.0 folder but en_US folder os not there. The only folder under samples is 1033 folder. I also searched the entire harddrive for "Audice" and I found nothing. I appreciate if you help me with that. I am looking forward having a solution to my problem.

Thanks
0 Kudos
Steven_L_Intel1
Employee
459 Views
You need to look under where Intel Fortran was installed. For example, C:\Program Files (x86)\Intel\Composer XE 2011 SP1\Samples\en_US\Fortran Here you will find a collection of ZIP files. Unzip COM.zip to your desktop or another location that is writable by you (not under the product install area.) Inside COM.zip is the AUTODICE sample which uses COM to communicate with Excel. You will probably have to study the Microsoft documentation on Excel's COM interface to adapt it to your needs.
0 Kudos
hhadavi
Beginner
459 Views
Hi Steve,

Thanks a lot. I have it working now.

0 Kudos
Reply