Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DBF to fomatted xls spreadsheet
Message
De
04/08/2003 19:49:04
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
04/08/2003 12:34:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00816537
Message ID:
00816689
Vues:
18
>I would like some input on how to copy data to an already formatted excel spreadsheet. This is something for very new to me. So if any has any ideas please email me back. Thanks in advance.

Hi Kimberly,

You haven't said what your data is like. Is there a lot of data? Do you have a table or specific values that you have in variables or arrays? Here's some code that might get you started:
oExcel = CREATEOBJECT("Excel.Application")
oExcel.Visible = .T. && For testing.
*!* Book1 exists in Excel's default directory.
oExcel.Workbooks.Open("Book1.xls") 

*!* Enter values one at a time.
oSheet = oExcel.ActiveSheet
oSheet.Range("B5").Value = 42

*!* Enter a whole table.
SELECT SomeTable
GO TOP
_VFP.DataToClip(,,3)
oSheet.Range("B5").Select()
oExcel.Paste()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform