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

Autodice and EXCEL12

LeonardB
New Contributor I
1,681 Views

I have run to problems when upgrading an old application that is partly copied from the AUTODICE sample code. I cant get the application or the AUTODICE example to work with EXCEL12 (EXCEL2007).

I have upgraded EXCEL.f90 file to EXCEL12 using the Fortran Module Wizard and the instructions of the read-me file. The AUTODICE example compiles and links OK. Execution gives error status when calling WORKBOOKS_OPEN or WORKBOOKS_ADD.

Fortran version = IVF11.1.065 on windows XP

0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,681 Views
You need to change the first argument in the call to COMCREATEOBJECT to reflext the version of EXCEL you have. It would be 'Excel.Application.12' for Excel 2007. You didn't need to recreate EXCEL.F90 but it probably didn't hurt.

In the next major release, this example has been modified to work with Excel 2010, 2007 and 2003.
0 Kudos
LeonardB
New Contributor I
1,681 Views
Hi Steve,
COMCREATEOBJECT("Excel.application.12",..) is in use and the $Status is stillset to nonzero by Workbooks_Open ($status=Zx80028018). When changing the call to Workbooks_Add the same status is returned.
Regards
Leonard
0 Kudos
Steven_L_Intel1
Employee
1,681 Views
I've attached the latest version of AUTODICE. Compare it to what you have. You may want to revert to the older EXCEL.F90 to eliminate another possible source of problem.
0 Kudos
aagaard
Beginner
1,681 Views
Hi All

I did struggle with the COM interface to Excel myself. In fact it is not a problem on the FORTRAN side, but rather a peculiarity in the way MS has internationalized it's product.
Leonard, based on your mail adr and name I assume, that your environment is like this: XP/VISTA or 7 with language setting set to SE or other nordic (danish myself)and you are running an English version of Office. For this combination Excel tries to load some dll, which is not part of the standard install, but comes with an Internationalization package that can be downloaden from MS. Right now I do not remember the package name, but I will try to find that later. As a temporary or test solution you could try to change your Windows language settings to US. When I did the COM interface did work.
Hopes it will for you too.

Found the MS support entry.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;320369

More information and hack can be found here:
http://www.add-in-express.com/creating-addins-blog/2009/02/13/old-format-invalid-type-library/
http://brianseekford.com/index.php/tag/0x80028018/

Allan
0 Kudos
Reply