Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code verification
Message
From
08/05/2002 10:26:49
N. Lea
Nic Cross Enterprises
Valencia, California, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Code verification
Miscellaneous
Thread ID:
00653988
Message ID:
00653988
Views:
46
Hello!

I just wanted to see if anyone could see what I am doing wrong with this code. I used the Macros in Excel XP to find out the coding associated with the spreadsheet and importing, but when I incorporate it with Foxpro, I get a function missing, but I do not see anything missing. I am trying to bring a .txt file and import it into Excel XP. I am trying to do the conversion in Excel XP (the .txt is created as a | delimited). Once that is done, i am then saving it as an Excel File and bringing it to a Foxpro structured table that i created. I attempted to use the Append From command, but it did not work out for me. I then tried the IMPORT FROM aging.txt TYPE DELIMITED BY CHARACTER '|', but it blew a syntax error. Any help or suggestions? Thank you!!



** // Begin Excel Automation Process
oExcel = CreateObject("Excel.Application")
oExcel.Visible = 1 && for debugging
oWorkbook = oExcel.Workbooks.OpenText(.pcapdatapath + "aging.txt", Origin:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ ;
xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False _ , ;
Comma:=False, Space:=False, Other:=True, OtherChar:="|", FieldInfo _ ;
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), _ ;
Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1 _), ;
Array(14, 1), Array(15, 1)), TrailingMinusNumbers:=True )
oExcel.Cells.Select
oExcel.ActiveWorkbook.SaveAs(addbs(.pcapdatapath)+"aging.xls", xlNormal)
oExcel.Activeworkbook.Close(0)

Next
Reply
Map
View

Click here to load this message in the networking platform