Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to put data in Ms-Excel template ?
Message
De
24/10/2001 16:15:06
 
 
À
24/10/2001 15:42:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00572860
Message ID:
00572886
Vues:
34
Marc,

You could try something like this:
SELECT SomeFields FROM WhatEver INTO CURSOR ExcelData

*-- copy data to clipboard
_vfp.DataToClip(ALIAS(),RECCOUNT(), 3)

LOCAL oXls
oXls = CREATEOBJECT("Excel.Application")
oXls.Application.DisplayAlerts = .f.

loWorkBook = oXls.application.Workbooks.open(< YourTemplate >)

*-- select destination cell
oXls.ActiveSheet.range("C3").select
oXls.ActiveSheet.paste

loWorkBook.SaveAs(< NewExcelFile >)

oXls.application.quit()
HTH
>Using code in VFP, I want to place data in a specific range (row and column)
>in a Ms-Excel pre-formatted file (template) and save it as a new name.
>Someone knows how to do that in VFP?
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform