Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Substituting arrays of VB
Message
De
25/04/2002 10:59:27
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Substituting arrays of VB
Divers
Thread ID:
00649148
Message ID:
00649148
Vues:
117
Hi,

I am using Excel ("Excel.Application") from VFP to do some formatting of a spreadsheet. I am also importing a textfile into the worksheet. I looked at the macros that excel created and tried to implement the same in VFP. However, there is one hurdle to pass. I do not know how to substitute the Array command in VB.

For Eg: Look the following program segment

loExcel=CreateObject("Excel.Application")
loNewBook = loExcel.Workbooks.Add()
loThisSheet = loNewBook.ActiveSheet
loAddBook=loThisSheet.QueryTables.Add("TEXT;C:\TEST.TXT",loThisSheet.Range("Sheet1!A1"))

The following line has the array command of VB, which I have difficulty implementing in VFP.

loAddBook.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1)

How can I pass the right values to 'TextFileColumnDataTypes' Property in VFP. I tried passing an array in VFP, but failed.

If anyone has used or knows this, I would greatly appreciate your help.

TIA
Solutions: when you want it, as you want it!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform