Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing array parameters to Excel 97 from VFP6.
Message
From
04/04/2002 09:10:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Passing array parameters to Excel 97 from VFP6.
Miscellaneous
Thread ID:
00640840
Message ID:
00640840
Views:
131
In VFP 6.0 I'm automating Excel 97's OpenText method. OpenText has 13 parameters. The first 12 of these are working fine, but the final item, FieldInfo, is problematic for me because it requires one or more arrays to be passed as parameters, and I'm ignorant of the proper syntax.

If I were writing an Excel 97 macro in VBA language, what I need for my FieldInfo parameter would be the following:

Array(Array(0,1), Array(27,1), Array(45,1), Array(63,1))

That is, I want to parse the source document into four columns, all of Excel's "General" type (hence, the 1 at the end of each set). The first column starts with character 1, the second with character 28, the third with character 46, and the fourth with character 64. (This particular parameter is zero-based, so the parameter number is one less than the actual character number you wish to operate on).

The challenge is how to get the above information into a VFP6 statement so that (1) VFP will accept it; and (2) the effect in Excel 97 will be the same as if I had run the above as part of a regular VBA Excel macro.
Next
Reply
Map
View

Click here to load this message in the networking platform