Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Substituting arrays of VB
Message
From
25/04/2002 10:59:27
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Substituting arrays of VB
Miscellaneous
Thread ID:
00649148
Message ID:
00649148
Views:
114
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!
Next
Reply
Map
View

Click here to load this message in the networking platform