Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy table with memo fields to an excel spreadsheet
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00212511
Message ID:
00212548
Vues:
27
Colin,

You are a gentleman. Thank you very much for the tip. This is what I needed.

Does anyone have a technique to copy the contents of a *.dbf file with memo fields to an Excel spreadsheet?
>
>Use OLE Automation of excel. Here is a small example:
>
>
>SELECT table
>
>ox=CREATEOBJECT('Excel.Application')
>ox.workbooks.add()
>
>mnrowadd=0
>SCAN
>	ox.Activeworkbook.Worksheets(1).Cells(1+mnrowadd,1).Value=Field1
>	ox.Activeworkbook.Worksheets(1).Cells(1+mnrowadd,2).Value=Field2
>	ox.Activeworkbook.Worksheets(1).Cells(1+mnrowadd,3).Value=Field3
>	ox.Activeworkbook.Worksheets(1).Cells(1+mnrowadd,4).Value=Field4
>	ox.Activeworkbook.Worksheets(1).Cells(1+mnrowadd,5).Value=Field5
>	ox.Activeworkbook.Worksheets(1).Cells(1+mnrowadd,6).Value=Field6
>	mnrowadd=mnrowadd+1
>ENDSCAN
>
>ox.ActiveWorkbook.SaveAs(%filename%)
>ox.Quit
>RELEASE ox
>
>
>
>HTH
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform