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!