Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Export DBF --> XLS
Message
 
To
01/12/2005 05:27:26
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01073597
Message ID:
01073608
Views:
13
>HI BORISLAV,
>
>I would want to use something like that :
>
>o=CREATEOBJECT("Excel.application")
>.
>.
>
>THANKS

You can but COPY TO is fatser :-)
LOCAL oExcel AS Excel.Application

oExcel = CREATEOBJECT([Excel.Application])
oExcel.Visible = 1
oExcel.WorkBooks.Add()
USE Rab
lnFlds = AFIELDS(laFields)
FOR lnFor = 1 TO lnFlds
    oExcel.Cells(1,lnFor).Value = laFields[lnFor,1]
NEXT
lnRow = 2
SCAN
    FOR lnFor = 1 TO lnFlds
        oExcel.Cells(lnRow,lnFor).Value = TRANSFORM(EVALUATE(laFields[lnFor,1]))
    NEXT
   lnRow = lnRow + 1
ENDSCAN
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform