Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing array parameters to Excel 97 from VFP6.
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Passing array parameters to Excel 97 from VFP6.
Divers
Thread ID:
00640840
Message ID:
00640840
Vues:
136
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform