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

Calling EXCEL functions

Intel_C_Intel
Employee
554 Views
I am trying to develop a program to load data into an EXCEL workbook using the EXCEL97A module as used in the AUTODICE example project. I have successfully run and modified the AUTODICE example and I think I understand what it is doing. I would like to achieve something more complicated, writing data and functions to a number of different sheets and producing a chart from each. I therefore need to use some of the other routines from EXCEL97A - is there any documentation for them anywhere? Specifically, at the moment, I am struggling to select a specific sheet from the workbook - any suggestions?

Joe
0 Kudos
3 Replies
marcellocattaneo
Beginner
554 Views
I dont know about any documentation specific to EXCEL97A.

The workaround I have found is to go in to the XL-VBA help or the VBA Object model documentation, find the methods that are related to what I want to do and then search for similar names in EXCEL97A.

For instance, if you are looking to insert a range in a worksheet, the VBA command would be:

Worksheets("Sheet1").Range("A1:C5").Insert Shift:=xlShiftDown

In EXCEL97A, the corresponding function is:

FUNCTION Range_Insert($OBJECT, Shift, $STATUS)

Usually, the arguments of the Fortran function correspond to the arguments in the VBA method, so you can figure out what's going on.

In the above example, $OBJECT would be a handle to the range you want to insert and Shift is the XLShiftDown constant (-4121).

From what I have been able to figure out, EXCEL97A supports all (or nearly all) the methods related to the following Excel classes:

Application, Global, OleObject, Workbook, Workbooks, Worksheet, Worksheets, Range.

0 Kudos
shailendra_singh
Beginner
554 Views
Please let me also know if you sorted out your problem to select specific sheet.
0 Kudos
Intel_C_Intel
Employee
554 Views
> Please let me also know if you sorted out your
> problem to select specific sheet.

No. A start was made (by someone else) to write a main routine in VB but the project is on ice at the moment.
0 Kudos
Reply